cumsum2: Integrate a time series

View source: R/cumsum2.R

cumsum2R Documentation

Integrate a time series

Description

Performs the operation of integrating a time series (inverse of a difference). Allows seasonal integtation.

Usage

cumsum2(w, lag = 1, start)

Arguments

w

The input time series.

lag

Seasonal lag if a seasonal integration is desired. The default is lag=1.

start

Optional value that will be the base value. The degault is to use the first element of w.

Value

A time series.

Examples

ozone.xmat <- read.csv(RTseriesExtDataPath("ozoneRegdat.csv"))
ozo.xreg <- cbind(ozone.xmat[,2], cumsum2(ozone.xmat[,3],12), cumsum2(ozone.xmat[,4],12))

wqmeeker/RTseries documentation built on Dec. 31, 2022, 10 a.m.