rholiday {almanac} | R Documentation |
Create a recurring holiday
Description
rholiday()
is used to create custom holidays. It wraps up a holiday name
and its corresponding rschedule
into a holiday object with special
properties.
Holiday objects can be tweaked with hol_rename()
, hol_observe()
, and
hol_offset()
, and they can be added to a calendar with rcalendar()
.
Usage
rholiday(rschedule, name)
Arguments
rschedule |
The recurrence schedule that determines when the holiday occurs. |
name |
The name of the holiday. This serves as a unique identifier when adding
multiple holidays to an |
Examples
on_christmas <- yearly() %>%
recur_on_month_of_year("Dec") %>%
recur_on_day_of_month(25)
# Bundle a holiday name with its recurrence schedule to create a holiday
rholiday(on_christmas, "Christmas")
# This is how the built in holiday objects are created
hol_christmas()
[Package almanac version 1.0.0 Index]