Skip to contents

Inspired by the implementation in the epiweeks Python package.

Usage

epiyear_n_weeks(epiyear, epiweek_standard)

Arguments

epiyear

Integer vector of epidemiological year values.

epiweek_standard

One of "MMWR" or "USA" (USA MMWR epiweek, starts on Sunday) and "ISO" (ISO week, starts on Monday). Not case-sensitive. Must be a single value.

Value

Integer vector of the number(s) of weeks in the given epidemiological year(s).

Examples


epiyear_n_weeks(2023, "MMWR")
#> [1] 52

epiyear_n_weeks(2023, "USA")
#> [1] 52

epiyear_n_weeks(2023, "ISO")
#> [1] 52