mlag: Lag matrix or vector

Description Usage Arguments Value Examples

View source: R/utils.R

Description

This function shifts elemnts in a vector or a mtrix by a given lag. For example: mlag(x,1) - use yesterday's values and mlag(x,-1) - use tomorrow's values

Usage

1
mlag(m, nlag = 1)

Arguments

nlag

number of lags, defaults to 1

x

vector / matrix

Value

modified object

Examples

1
2
3
4
## Not run: 
mlag(1:10)

## End(Not run)

drewgriffith15/griffun documentation built on Nov. 21, 2018, 8:24 p.m.