Lead or lag vectors or lists.
shift(x, n = 1L, type = "lag")
| x | a vector or list. |
|---|---|
| n | an integer denoting the offset by which to lead or lag the input. This function only supports n>=0. |
| type | Default is |
An object with the same class as x that contains the lead/lag of input x.