u0: Get the initial compartment state

u0R Documentation

Get the initial compartment state

Description

Get the initial compartment state

Usage

u0(model, ...)

## S4 method for signature 'SimInf_model'
u0(model, ...)

Arguments

model

The model to get the initial compartment state u0 from.

...

Additional arguments. Currently not used.

Value

a data.frame with the initial compartment state.

Examples

## 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)

SimInf documentation built on Jan. 23, 2023, 5:43 p.m.