Function to convert an epidemiological week and year ("epiweek" and "epiyear") pair to a date in a safe way.
Arguments
- epiweek
Epidemiological week, as an integer (e.g.
46
). Must be between 1 and the number of weeks inepiyear
, as determined byepiyear_n_weeks()
.- epiyear
Epidemiological year, as an integer (e.g.
2022
).- day_of_week
day of the epiweek whose date should be returned, as a 1-indexed integer. 1 is the first date in the epiweek and 7 the last. Default
1
.- 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. Default"MMWR"
.
Value
The date, as a lubridate::date
object