lagn {cif}R Documentation

lag j of matrix or vector y

Description

lagn(y,j,fill=NA) produces lag j of matrix or vector y, with fill in missing j cells REM: alternative to "lead-lag" dplyr which applies to vector y

Usage

lagn(y, j, fill = NA)

Arguments

y

column vector or matrix

j

number of lags

fill

value to be used to fill the missing values at the beginning, default = NA

Value

y lagged j cells, with fill in the missing j positions

Author(s)

P. Berta, P. Paruolo, S. Verzillo, PG. Lovaglio

References

Berta et al. 2020


[Package cif version 0.1.1 Index]