Learn R Programming

OpenABMCovid19 (version 1.0.1)

VaccineSchedule: R6Class VaccineSchedule

Description

VaccineSchedule object has information an age-group vaccination plan.

Arguments

Public fields

fraction_to_vaccinate

Get the vaccination fractions per age-group.

total_vaccinated

The total number of vaccinations per age-group.

vaccine

The R vaccine object

Methods

Public methods

Method new()

Usage

VaccineSchedule$new(
  frac_0_9 = 0,
  frac_10_19 = 0,
  frac_20_29 = 0,
  frac_30_39 = 0,
  frac_40_49 = 0,
  frac_50_59 = 0,
  frac_60_69 = 0,
  frac_70_79 = 0,
  frac_80 = 0,
  vaccine = -1,
  fractions = NA
)

Arguments

frac_0_9

Fraction of age group 0-9.

frac_10_19

Fraction of age group 10-19.

frac_20_29

Fraction of age group 20-29.

frac_30_39

Fraction of age group 30-39.

frac_40_49

Fraction of age group 40-49.

frac_50_59

Fraction of age group 50-59.

frac_60_69

Fraction of age group 60-69.

frac_70_79

Fraction of age group 70-79.

frac_80

Fraction of age group >80.

vaccine

A vaccine object

fractions

Fractions for all age groups. This is an alternative way c(frac_0_9, frac_10_19, frac_20_29, frac_30_39, frac_40_49, frac_50_59, frac_60_69, frac_70_79, frac_80). If not NA, then the parameters prefixed by frac_ are ignored.

Examples

Run this code
# NOT RUN {
# Create a new vaccine object
model <- OpenABMCovid19::Model.new( params = list(n_total = 10000) )
Vaccine <- model$add_vaccine()

# Vaccinate 15% of age group 70-79 and 85% of age group 80+
vaccine.schedule <- OpenABMCovid19::VaccineSchedule$new(
  frac_70_79 = 0.15,
  frac_80    = 0.85,
  vaccine    = Vaccine
)
# }

Run the code above in your browser using DataLab