Extract selected time series from a gts object
The time series from selected levels of a hierarchical/grouped time series or a forecasted hierarchical/grouped time series are returned as a multivariate time series.
aggts(y, levels, forecasts = TRUE)
- An object of class
- Integer(s) or string(s) giving the specified level(s).
objcontains forecasts and historical data, then
forecastsindicates whether to return the forecasts or the historical data. Otherwise it is ignored.
aggts(htseg1, levels = c(0, 2)) aggts(infantgts, levels = "State")
Looks like there are no examples yet.