ecd.lag: Utility to shift a vector of numeric or mpfr

View source: R/ecd-lag-method.R

ecd.lagR Documentation

Utility to shift a vector of numeric or mpfr

Description

This utility is basically the same as Hmisc::Lag, but it handles mpfr vector properly.

Usage

ecd.lag(x, shift = 1, na.omit = FALSE)

Arguments

x

a vector of numeric or mpfr

shift

integer, cells to shift

na.omit

logical, whether to remove the NAs

Value

the shifted vector

Examples

x <- ecd.lag(c(1,2,3))
y <- ecd.lag(ecd.mpfr(c(1,2,3)))

ecd documentation built on May 10, 2022, 1:07 a.m.