Create a vector of the lag of a variable and fill missing values with NA's.
lagpad(x, k = 1)
A vector to be lagged
The number of lags to output
The lagged vector with NA's in missing values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.