Learn R Programming

expandFunctions (version 0.1.0)

eLag: Convert vector into a matrix of lag columns

Description

Convert vector into a matrix of lag columns

Usage

eLag(x, colParamVector, pad = NA)

Arguments

x
Data vector
colParamVector
Vector of lags for embedding
pad
Scalar for padding embedding

Value

A matrix whose columns are x lagged by the corresponding values in colParamVector.

See Also

embed and embedd, which are related functions.

Examples

Run this code
eLag(1:6, 0:2)
eLag(1:6, 0:2, pad=0)

Run the code above in your browser using DataLab