Description Usage Arguments Value Examples
The function heavily relies on the timeDate package in R for all holidays. Specifically it utilizes the listHolidays function to figure out which holidays are existing.
1 2 3 4 | genHolidays(
years = (lubridate::year(Sys.Date()) - 2):lubridate::year(Sys.Date()),
country
)
|
years |
the years for which to generate the holidays given as 2013:2017 as an example where the default is the last three years |
country |
specifies which specific country to focus on except the "global" holidays where the possible values are "CA", "CH", "DE", "FR", "GB", "IT", "JP", "US" |
a one hot encoded tibble where each column is a holiday and the first column is the ISO date
1 2 | b <- genHolidays(2016:2017)
b[1:10, 1:5]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.