temporal_aggregation | R Documentation |
Creates a list of aggregated time series from a time series of class ts.
temporal_aggregation(y, agg_levels = NULL)
y |
univariate time series of class ts. |
agg_levels |
user-selected list of aggregation levels. |
If agg_levels=NULL
then agg_levels
is automatically generated by taking all the factors of the time series frequency.
A list of ts objects each containing the aggregates time series in the order defined by agg_levels
.
get_reconc_matrices()
# Create a monthly count time series with 100 observations
y <- ts(data=stats::rpois(100,lambda = 2),frequency = 12)
# Create the aggregate time series according to agg_levels
y_agg <- temporal_aggregation(y,agg_levels = c(2,3,4,6,12))
# Show annual aggregate time series
print(y_agg$`f=1`)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.