Lag values
Shifts a vector forward by n positions, filling with NA.
x (Vector): The input vector.
Vector
n (Int): (Optional) Number of positions to shift. Default is 1.
Int
The shifted vector.
lag([1, 2, 3]) -- Returns = [NA, 1, 2]
lead