Description Usage Arguments Value Examples
Creates a lagged variable of a numerical vector without requiring it to be of time series class.
1 |
x |
A numeric, character or logical vector that needs to be lagged. |
d |
The number of lags (in units of observations). By default set to 1. |
na.rm |
A logical that indicates whether NA elements should be removed from the output or not. By default set to FALSE. |
A numeric vector of the same length as x
if na.rm
is set to FALSE, otherwise it is of the same length as x
without NA elements.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.