library(sims)
library(nlist)
code <- "for(i in 1:2){
M[i,1] ~ dnorm(0,1)
M[i,2] <- 2}"
pop <- sims::sims_simulate(code)
pop
$M
[1] -0.3119009 0.9283874 2.0000000 2.0000000
an nlists object of an nlist object with 1 natomic element
Here we were hoping M would be a matrix rather than a vector...
library(sims) library(nlist) code <- "for(i in 1:2){ M[i,1] ~ dnorm(0,1) M[i,2] <- 2}" pop <- sims::sims_simulate(code) pop
$M [1] -0.3119009 0.9283874 2.0000000 2.0000000 an nlists object of an nlist object with 1 natomic element Here we were hoping M would be a matrix rather than a vector...