agg_ts: Non-overlapping temporal aggregation of a time series

View source: R/agg_ts.R

agg_tsR Documentation

Non-overlapping temporal aggregation of a time series

Description

Non-overlapping temporal aggregation of a time series according to a specific aggregation order.

Usage

agg_ts(agg_order, x, align = "end", rm_na = FALSE)

Arguments

agg_order

Aggregation order to consider.

x

Univariate time series: a vector or a ts object.

align

Specifies whether the aggregates should be aligned with the start () or end of the series.

rm_na

logical. Should missing values be removed?

Value

A vector or ts object

See Also

Other utilities: Cmatrix(), FoReco2ts(), arrange_hres(), commat(), ctf_tools(), hts_tools(), lcmat(), oct_bounds(), residuals_matrix(), score_index(), shrink_estim(), thf_tools()

Examples

data(FoReco_data)
annual_ts <- agg_ts(12, FoReco_data$obs$k1[,1]) # == FoReco_data$obs$k12[,1]


FoReco documentation built on May 31, 2023, 5:17 p.m.