is.holiday.RdDetermine the date represented by a chron or dates object is a weekend or a holiday.
is.weekend(x)
is.holiday(x, holidays)
.Holidaysa logical object indicating whether the corresponding date is a
weekend in the case of is.weekend() or a holiday in the case of
is.holiday().
dts <- dates("01/01/98") + trunc(365 * runif(50))
table(is.weekend(dts))
#>
#> FALSE TRUE
#> 35 15
.Holidays
#> New Year's Day Memorial Day Independence Day Labor Day
#> 01/01/92 05/25/92 07/04/92 09/07/92
#> Thanksgiving Christmas
#> 11/26/92 12/25/92
# New Year Memorial Indepen. Labor day Thanksgiving Christmas
# 01/01/92 05/25/92 07/04/92 09/07/92 11/26/92 12/25/92
# NOTE: Only these 6 holidays from 1992 are defined by default!