get_config_humans_SIR | R Documentation |
The JSON config file should have 8 entries:
stochastic: a boolean value
theta: matrix (row major)
wf: vector
H: vector
SIR: matrix (row major)
b: scalar
c: scalar
gamma: scalar
For interpretation of the entries, please read setup_humans_SIR.
get_config_humans_SIR(path)
path |
a file path to a JSON file |
a named list
# to see an example of proper JSON input, run the following library(jsonlite) n <- 6 # number of human population strata p <- 5 # number of patches theta <- matrix(rexp(n*p), nrow = n, ncol = p) theta <- theta / rowSums(theta) H <- rep(10, n) SIR <- matrix(0, nrow = n, ncol = 3) SIR[, 1] <- H par <- list( "stochastic" = FALSE, "theta" = theta, "wf" = rep(1, n), "H" = H, "SIR" = SIR, "b" = 0.55, "c" = 0.15, "gamma" = 1/7 ) toJSON(par, pretty = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.