powered by
This utility is basically the same as Hmisc::Lag, but it handles mpfr vector properly.
Hmisc::Lag
ecd.lag(x, shift = 1, na.omit = FALSE)
a vector of numeric or mpfr
integer, cells to shift
logical, whether to remove the NAs
the shifted vector
# NOT RUN { x <- ecd.lag(c(1,2,3)) y <- ecd.lag(ecd.mpfr(c(1,2,3))) # }
Run the code above in your browser using DataLab