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

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
2
  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.

Author(s)

Steven L. Scott steve.the.bayesian@gmail.com

See Also

bsts.mixed.

Examples

1
2
3
4
5
6
  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)

michelletran/bsts documentation built on March 29, 2020, 12:58 a.m.