Strain: R6Class Strain

Description Active bindings Methods Examples

Description

Strain object has information about each new strain

Active bindings

c_strain

the C strain R pointer object (SWIG wrapped)

Methods

Public methods


Method new()

Usage
Strain$new(model, strain_id)
Arguments
model

R6 Model object

strain_id

The strain ID.


Method idx()

Wrapper for C API strain$idx().

Usage
Strain$idx()
Returns

the index of the strain


Method transmission_multiplier()

Wrapper for C API strain$transmission_multiplier().

Usage
Strain$transmission_multiplier()
Returns

the transmission_multiplier of the strain


Method hospitalised_fraction()

Wrapper for C API strain$hospitalised_fraction().

Usage
Strain$hospitalised_fraction()
Returns

the hospitalised fraction for the strain

Examples

1
2
3
# Add new strain with increased transmissibility
model = Model.new( params = list( n_total=10000, max_n_strains=3 ) )
strain = model$add_new_strain( transmission_multiplier = 1.3 )

OpenABMCovid19 documentation built on July 20, 2021, 5:08 p.m.