.BG
.FN aggregate
.TL
Decrease Periodicity of Time Series by Aggregation
.CS
aggregate(x, nf=1, fun=sum)
.AG x
time series.
.AG nf
desired frequency for aggregated time series;
must be a divisor of the frequency of `x'.
.AG fun
function to be used in performing aggregation.
Most commonly, `fun' is either `mean', to give the mean
level for rate-like series, or `fun' is `sum'
in order to compute totals.
.RT
new time-series with frequency `nf'.
Each group of `frequency(x)/nf' observations is given to function `fun'
to create the aggregate value.
.br
.ne 3
.EX
aggregate(co2,1,mean)  # yearly co2 level
aggregate(ship,4,sum)  # quarterly manufacturing shipments
.KW ts
.WR
