stratifySeasonData: Stratify a time series by season
Description
Splits a two-column (date, value) time series into a list of seasonal
subsets, plus a parallel list of nonzero-only subsets.
Usage
stratifySeasonData(TS, season)
Value
a list of two elements: [[1]] named list of full seasonal
subsets; [[2]] named list of nonzero seasonal subsets
Arguments
- TS
data frame or data table with columns date and value
- season
character; name of a date-component function
(e.g. "month", "week")