Learn R Programming

SimInf (version 9.8.1)

select_matrix: Extract the select matrix from a SimInf_model object

Description

Utility function to extract events@E from a SimInf_model object, see SimInf_events

Usage

select_matrix(model)

# S4 method for SimInf_model select_matrix(model)

Value

dgCMatrix object.

Arguments

model

The model to extract the select matrix E from.

Examples

Run this code
## Create an SIR model
model <- SIR(u0 = data.frame(S = 99, I = 1, R = 0),
             tspan = 1:5, beta = 0.16, gamma = 0.077)

## Extract the select matrix from the model
select_matrix(model)

Run the code above in your browser using DataLab