holidays(years, type="USFederal", move=F)
options("time.zone").
This function calls the
holiday.xxx functions, where
xxx takes on the
value of each of the strings in the
type argument. If these functions
do not exist, an error will occur. After calling
the
holiday.xxx functions,
holidays will call
holiday.nearest.weekday
if
move is T; this will move the holidays so they lie
on weekdays.
move can also be given as a logical
vector, in which case each element applies to the corresponding
element of
type.
# Generate Christmas, New Years, and Veterans day, moving Christmas
# and New Years to the nearest weekday
holidays(1994:2005, c("Christmas", "NewYears", "Veterans"),
c(T, T, F))