Specify a date range (in days or epiweeks) for an API request.
ArgumentsThe first date to request. Can be specified as a Date
or as an integer or integer-like string in the format YYYYMMDD for dates or YYYYWW for epiweeks.
The final date to request (inclusive), specified the same way as from
.
An EpiRange
object.
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.
Examples# Represents 2021-01-01 to 2021-01-07, inclusive
epirange(20210101, 20210107)
#>
#> ── <EpiRange> object: ──────────────────────────────────────────────────────────
#> Days from 2021-01-01 to 2021-01-07
# The same, but using Date objects
epirange(as.Date("2021-01-01"), as.Date("2021-01-07"))
#>
#> ── <EpiRange> object: ──────────────────────────────────────────────────────────
#> Days from 2021-01-01 to 2021-01-07
# Represents epiweeks 2 through 4 of 2022, inclusive
epirange(202202, 202204)
#>
#> ── <EpiRange> object: ──────────────────────────────────────────────────────────
#> Epiweeks from 2022w02 to 2022w04
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4