extract_incidence: extracts the incidence data for a given country and year

View source: R/forecasting_practical.R

extract_incidenceR Documentation

extracts the incidence data for a given country and year

Description

extract_incidence takes the flu incidence matrix and extracts the incidence for a given flu season and a given country.

Usage

extract_incidence(flu_data, country_code = "ISR", year = 2016)

Arguments

flu_data

matrix with flu incidence data

country_code

character vector of length 1: 3-letter country code

year

numeric vector of length 1: year to extract

Value

data frame with three columns: t: numeric vector of length 52/53 (depending on the year): index running from 1 to 52/53 time_name: character vector of the same length as t: week numbers of the data we've extracted incidence: numeric vector of the same length as t: incidence for those weeks


c97sr/learnidd documentation built on Jan. 12, 2025, 4:24 p.m.