library(nimble)
library(base)
n <- 10
set.seed(11)
x <- rnorm(n)
X.sort <- {x[1]}
for(i in 2:n){
X.sort <- append(X.sort, x[i], after = sum(X.sort > x[i]))
}
X.sort
sort<-nimbleFunction(
run=function(x=double(1))
sort<-x[1]
for(i in 2:length(x)){
sort<-append(sort,x[i],after=sum(sort>x[i]))})
sort(x)
I would be grateful for help.
Best regards--
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/9efa2c7b-26ec-48da-87bd-2941d6fbdbb5n%40googlegroups.com.