dif: Returns lagged and differenced data where input and output...

View source: R/dif.R

difR Documentation

Returns lagged and differenced data where input and output are same length.

Description

Returns lagged and differenced data where input and output are same length.

Usage

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

Arguments

x

A numeric, time series, or xts variable.

lag

A number that represents the maximum lag order.

differences

Number of times data should be differenced.

...

Optional input arguments.

Value

Vector of data that is the sample length as input.

Examples

dif(rnorm(100), 1, 1)

KevinKotze/tsm documentation built on July 29, 2024, 2:18 p.m.