powered by
Vector of input lagged along integer vector
lag_run(x, k = 1L, idx = 1L)
Vector of any type
integer vector which specifies window length
an optional integer vector containing index of observations.
# NOT RUN { lag_run(1:10, k=3) lag_run(letters[1:10],k=2, idx=c(1,1,1,2,3,4,6,7,8,10)) # }
Run the code above in your browser using DataLab