lag

Share:

Description

Lag or lead a time series

Usage

1
2
## S4 method for signature 'scidb'
lag(x, k=1, dim=1, `eval`=FALSE)

Arguments

x

A scidb array object.

k

Coordinate system units to lag by.

dim

SciDB array dimension to lag along.

eval

(Optional) If true, execute the query and store the reult array. Otherwise defer evaluation.

Value

A scidb array object with identical schema as x, but whose values are shifted along the coordinate axis dim by the lag value k.

Author(s)

B. W. Lewis<blewis@paradigm4.com>

See Also

scidb

Examples

1
2
3
4
5
6
## Not run: 
x <- build("i",dim=10,names=c("x","i"),start=1,type="double")
y <- lag(x)
merge(x,y,by="i",all=TRUE)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.