Description Usage Arguments Details Value See Also Examples
Function to calculate dates from epidemiological weeks.
1 | epi_week_date(epi_week, epi_year, offset = 0, system = "who")
|
epi_week |
An object that can be coerced to a |
epi_year |
An object that can be coerced to a |
offset |
A number of days to offset the returned dates by. The default is 0 in which case the function returns the date of the first day of each epi week. An offset of 6 would instead return the date of the last day of each epi week. |
system |
Either "who" or "cdc". Defauly is "who".
See |
This function determines the date of the first day of each epi-week, optionally adding an offset to calculate the date of the last day of the week, or any other arbitrary amount.
epi_week
and epi_year
are recycled if necessary.
A Date
vector
Other epi.calendar.functions: add_epi_week
;
epi_week
; epi_year_start
1 2 3 4 | epi_week_date(1, 2010:2015)
epi_week_date(1:52, 2015)
epi_week_date(1:52, 2015, offset = 6) # return epi week end dates
epi_week_date(c(-1, 0, TRUE, 52, 53, 999, "a", NA), 2015) # NAs
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.