Learn R Programming

bsts (version 0.9.5)

week.ends: Check to see if a week contains the end of a month or quarter

Description

Returns a logical vector indicating whether the given week contains the end of a month or quarter.

Usage

WeekEndsMonth(week.ending)
  WeekEndsQuarter(week.ending)

Arguments

week.ending

A vector of class Date. Each entry contains the date of the last day in a week.

Value

A logical vector indicating whether the given week contains the end of a month or a quarter.

See Also

bsts.mixed.

Examples

Run this code
# NOT RUN {
  week.ending <- as.Date(c("2011-10-01",
                           "2011-10-08",
                           "2011-12-03",
                           "2011-12-31"))
  WeekEndsMonth(week.ending) == c(TRUE, FALSE, TRUE, TRUE)
  WeekEndsQuarter(week.ending) == c(TRUE, FALSE, FALSE, TRUE)
# }

Run the code above in your browser using DataLab