Learn R Programming

SimInf (version 5.0.0)

events: Extract the events from a SimInf_model object

Description

Extract the events from a SimInf_model object

Usage

events(model)

# S4 method for SimInf_model events(model)

Arguments

model

The model to extract the events from.

Value

SimInf_events object.

Examples

Run this code
# NOT RUN {
## Create an SIR model that includes scheduled events.
model <- SIR(u0     = u0_SIR(),
             tspan  = 1:(4 * 365),
             events = events_SIR(),
             beta   = 0.16,
             gamma  = 0.077)

## Extract the scheduled events from the model and
## display summary
summary(events(model))

## Extract the scheduled events from the model and
## plot summary
plot(events(model))
# }

Run the code above in your browser using DataLab