Description Usage Arguments Value Examples
A function that returns the federal holiday observed on a given date. If there was no holiday observed, it returns None. The function takes in a list of dates, where each date is in the format YYYY-MM-DD and checks them against a database of federal holidays (2012-2020). It returns the holiday that was/will be observed on the date. If no holiday is observed on that date, it returns "None" corresponding to that date. This computation happens in parallel and hence is very fast.
1 | infer_holiday(date_lst, detect_cores)
|
date_lst |
a list of dates strings of the format YYYY-MM-DD |
detect_cores |
If False (default), 2 cores are used. If True, half the number of cores are used on Mac OS else 2 cores are used. |
Returns the kind of fedral holiday that was/will be observed on that date. If there was no holiday observed, it returns None. It does the lookup in parallel and hence is very fast.
1 2 | infer_holiday(date_lst = c("2020-12-25", "2020-09-07", "2020-09-08", "2016-01-18",
"2016-01-19", "2016-01-15"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.