epirange | R Documentation |
Specify a date range (in days or epiweeks) for an API request.
epirange(from, to)
from |
The first date to request. Can be specified as a |
to |
The final date to request (inclusive), specified the same way as
|
Epiweeks, also known as MMWR weeks number the weeks of the year from 1 to 53, each week spanning from Sunday to Saturday. The numbering is defined by the CDC.
An EpiRange
object.
# Represents 2021-01-01 to 2021-01-07, inclusive
epirange(20210101, 20210107)
# The same, but using Date objects
epirange(as.Date("2021-01-01"), as.Date("2021-01-07"))
# Represents epiweeks 2 through 4 of 2022, inclusive
epirange(202202, 202204)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.