u0 | R Documentation |
Get the initial compartment state
u0(object, ...)
## S4 method for signature 'SimInf_model'
u0(object, ...)
## S4 method for signature 'SimInf_indiv_events'
u0(object, time = NULL, target = NULL, age = NULL)
object |
The object to get the initial compartment state
|
... |
Additional arguments. |
time |
Only used when object is of class
|
target |
Only used when object is of class
|
age |
Only used when object is of class
|
a data.frame
with the initial compartment state.
## Create an SIR model object.
model <- SIR(u0 = data.frame(S = 99, I = 1, R = 0),
tspan = 1:100,
beta = 0.16,
gamma = 0.077)
## Get the initial compartment state.
u0(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.