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

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

Examples

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