Description Usage Arguments Value See Also Examples
Analogous function for lead
and lag
in dplyr by
wrapping data.table's shift
.
1 2 3 |
x |
A vector |
n |
a positive integer of length 1, giving the number of positions to lead or lag by. Default uses 1 |
fill |
Value to use for padding when the window goes beyond the input length.
Default uses |
A vector
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.