Filter ic data records based on year of vaccine introduction Exclude ic data records for years when a vaccine had not been fully introduced in a country.

filter_yovi(X, vaccine = NULL, yovi = imcover::get_yovi(), na.rm = FALSE)

# S3 method for ic.df
filter_yovi(X, vaccine = NULL, yovi = imcover::get_yovi(), na.rm = FALSE)

# S3 method for icfit
filter_yovi(X, vaccine = NULL, yovi = imcover::get_yovi(), na.rm = FALSE)

# S3 method for iclist
filter_yovi(X, vaccine = NULL, yovi = imcover::get_yovi(), na.rm = FALSE)

Arguments

X

An object of class ic.df or icfit.

vaccine

Vector of vaccine codes as characters. Default is NULL which includes all vaccines in object X.

yovi

Table of the year of vaccine introduction. See details. Default value comes from imcover::get_yovi().

na.rm

Should records which do not have any data for year of introduction be removed? Default is FALSE to keep NA records in X.

Value

An object with type of X with records filtered by the year of vaccine introductions.

Details

The yovi argument can take a user-defined table of values. This must be a data.frame object with column names 'ISO3code', 'vaccine' and 'year_introduced'.

See also