lag_cols | R Documentation |
lag_cols
is a function that takes a vector of variable names
and lags them all.
lag_cols(data, cols, n = 1)
data |
Data frame or tibble |
cols |
Character vector of one or more column names found in |
n |
Variable in lag function, number of periods to lag |
Used in scripts: Robust function: FALSE
Lagged data frame
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.