# to see an example of proper JSON input, run the following
library(jsonlite)
p <- 5 # number of patches
t <- 10 # number of days to simulate
par <- list(
"stochastic" = FALSE,
"molt" = 0.3,
"surv" = rep(0.5, 365),
"K" = matrix(rpois(n = t * p, lambda = 100), nrow = p, ncol = t),
"L" = rep(10, p)
)
toJSON(par, pretty = TRUE)
Run the code above in your browser using DataLab