S function

Annual sum

Annual sum

S generates the annual sum of a monthly or quarterly time series.

S(x, extend = TRUE)

Arguments

  • x: an ts object.
  • extend: logical. If TRUE, the transformed series is extended with NA's to have the same length as the origianl series.

Returns

The transformed time series, a ts object.