diff {tframe}R Documentation

Time Series Shifting Operations

Description

lag a tframed object.

Usage

    diff(x, ...)
    diff(x, lag = 1, differences = 1, ...)

Arguments

x a tframed object.
lag difference calculated relative to lag periods previous.
differences order of differencing.
... arguments passed to other methods.

Details

A time framed object is created by differencing the number of times indicated by differences at a lagged number of periods indicated by lag. The default is take the difference from data one period previous. For lag see documentation for the generic (from library ts in R).

See Also

diff lag

Examples

    z <- ts(rnorm(100), start=c(1982,1), frequency=12)
    start(z)
    periods(z)
    z <- diff(z)
    start(z)
    periods(z)

[Package Contents]