date.range: Date Range

date.rangeR Documentation

Date Range

Description

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

Usage

  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


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)


bsts documentation built on May 29, 2024, 2:14 a.m.