# to see an example of proper JSON input, run the following
library(jsonlite)
t <- 10 # days to simulate
p <- 5 # number of patches
EIP <- rep(5, t)
p_surv <- 0.95
psi <- matrix(rexp(p^2), nrow = p, ncol = p)
psi <- psi / rowSums(psi)
par <- list(
"stochastic" = FALSE,
"f" = 0.3,
"q" = 0.9,
"eip" = EIP,
"p" = p_surv,
"psi" = psi,
"nu" = 20,
"M" = rep(100, p),
"Y" = rep(20, p),
"Z" = rep(5, p)
)
toJSON(par, pretty = TRUE)
Run the code above in your browser using DataLab