lag_run | R Documentation |
Vector of input lagged along integer vector
lag_run(x, lag = 1L, idx = integer(0), nearest = FALSE)
x |
( |
lag |
( |
idx |
( |
nearest |
|
lag_run(1:10, lag = 3)
lag_run(letters[1:10], lag = -2, idx = c(1, 1, 1, 2, 3, 4, 6, 7, 8, 10))
lag_run(letters[1:10], lag = 2, idx = c(1, 1, 1, 2, 3, 4, 6, 7, 8, 10), nearest = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.