lag_delta | R Documentation |
Functions to calculate the delta between a value and the lagged or leading value.
lag_delta(x, na_as_zero = FALSE)
lead_delta(x, na_as_zero = FALSE)
x |
Numeric vector. |
na_as_zero |
Should missing elements be set to 0? |
Numeric vector.
Stuart K. Grange.
lag_delta(sample(seq(0:10)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.