lagn | R Documentation |
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
lagn(y, j, fill = NA)
y |
column vector or matrix |
j |
number of lags |
fill |
value to be used to fill the missing values at the beginning, default = NA |
y lagged j cells, with fill in the missing j positions
P. Berta, P. Paruolo, S. Verzillo, PG. Lovaglio
Berta et al. 2020
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.