date.range: Date Range

Description Usage Arguments Value Author(s) Examples

Description

Returns the first and last dates of the influence window for the given holiday, among the given timestamps.

Usage

1
  DateRange(holiday, timestamps)

Arguments

holiday

An object of class Holiday.

timestamps

A vector of timestamps of class Date or class POSIXt. This function assumes daily data. Use with care in other settings.

Value

Returns a two-column data frame giving the first and last dates of the influence window for the holiday in the period covered by timestamps.

Author(s)

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

Examples

1
2
3
4
holiday <- NamedHoliday("MemorialDay", days.before = 2, days.after = 2)
timestamps <- seq.Date(from = as.Date("2001-01-01"), by = "day",
   length.out = 365 * 10)
influence <- DateRange(holiday, timestamps)

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