lagPad: Lag Function with Padding

View source: R/other_functions.R

lagPadR Documentation

Lag Function with Padding

Description

This function pads the lag taken numeric vector with NA values.

Usage

lagPad(x, k)

Arguments

x

numeric. A numeric vector.

k

numeric. A numeric lag value.

Value

A lag taken numeric vector with padding.

Author(s)

Omer Kara

Examples

x <- 1:10
x.t1 <- lagPad(x, 2)
cbind(x, x.t1)


omerkara/okara documentation built on Nov. 21, 2023, 7:56 p.m.