diff.errors: Lagged Differences

Description Usage Arguments Examples

View source: R/misc.R

Description

S3 method for errors objects (see diff).

Usage

1
2
## S3 method for class 'errors'
diff(x, lag = 1L, differences = 1L, ...)

Arguments

x

a numeric vector or matrix containing the values to be differenced.

lag

an integer indicating which lag to use.

differences

an integer indicating the order of the difference.

...

further arguments to be passed to or from methods.

Examples

1
2
3
4
5
diff(set_errors(1:10, 0.1), 2)
diff(set_errors(1:10, 0.1), 2, 2)
x <- cumsum(cumsum(set_errors(1:10, 0.1)))
diff(x, lag = 2)
diff(x, differences = 2)

errors documentation built on April 3, 2018, 5:03 p.m.