calendar-add-remove | R Documentation |
cal_add()
adds an rholiday to an rcalendar.
cal_remove()
removes an rholiday from an rcalendar by name, either by
specifying a character name or an rholiday object with the same name.
cal_add(x, rholiday)
cal_remove(x, what)
x |
An rcalendar. |
rholiday |
An rholiday to add to the rcalendar. |
what |
The name of a holiday to remove from the rcalendar, or an rholiday object with the corresponding name that you'd like to remove. |
A new rcalendar with the holiday added or removed.
cal <- rcalendar(
hol_christmas(),
hol_halloween(),
hol_new_years_day(),
hol_us_presidents_day()
)
# Can't forget Easter!
cal %>%
cal_add(hol_easter())
# Didn't actually need Halloween
cal %>%
cal_remove(hol_halloween())
# Can remove by name or by object
cal %>%
cal_remove("Halloween")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.