Description Usage Arguments Examples
The simulator uses the foreach and doRNG packages to ensure
reproducible, parallelizable results.  To run code in parallel, register
a foreach back-end such as doMC::registerDoMC().
1  | 
init | 
 Initial conditions - a patches X 4 (SIRV) matrix of populations  | 
parameters | 
 a list of parameter values. See below for details  | 
times | 
 a vector of output times to report  | 
n_sims | 
 number of simulations to run  | 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  |  library(doMC)
 registerDoMC(cores=2)
 parms = list(
   beta = 0.004,   #contact rate for direct transmission
   gamma = 0.167,  #recovery rate
   mu = 0,         #base mortality rate
   alpha = 0,      #disease mortality rate
   phi = 1.96e-4,  #infectiousness of environmental virions
   eta = 0.14,     #degradation rate of environmental virions
   nu =  0.001,    #uptake rate of environmental virion
   sigma = 0,      #virion shedding rate
   omega = 0,      #movement rate
   rho = 0,        #contact  nonlinearity 0=dens-dependent, 1=freq-dependent
   lambda = 0,    #force of infection from external sources
   cull_time = 0,    #average time, in days, it takes for a reported patch to be culled
   chi = matrix(c(1,0,0,1), nrow=2)  #patch connectivity matrix
   )
 initial_cond <- matrix(c(99, 1, 0, 0), nrow=2, ncol=4, byrow=TRUE)
 output <- mf_sim(init = initial_cond, parameters = parms, times=0:1000, n_sims = 2)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.