Skip to contents

Acts as parent class for national data classes, allowing them to access general methods defined in DataClass() but with additional

Details

On top of the methods documented in DataClass(), this class implements a custom filter function that supports partial matching to English country names using the countrycode package.

Super class

covidregionaldata::DataClass -> CountryDataClass

Public fields

filter_level

Character The level of the data to filter at. Defaults to the country level of the data.

Methods

Inherited methods


Method filter()

Filter method for country level data. Uses countryname to match input countries with known names.

Usage

CountryDataClass$filter(countries, level)

Arguments

countries

A character vector of target countries. Overrides the current class setting for target_regions. If the filter_level field level argument is set to anything other than level 1 this is passed directly to the parent DataClass() filter() method with no alteration.

level

Character The level of the data to filter at. Defaults to the conuntry level if not specified.


Method clone()

The objects of this class are cloneable with this method.

Usage

CountryDataClass$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.