Description Usage Arguments Examples
View source: R/lags.R
Calculate flexible number of lags
1
lags(var, n = 10)
n
1 2
d <- tibble(x = seq_len(100)) mutate(d, !!!lags(x, 10))
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.