shift: Lead/lag for vectors and lists

Description Usage Arguments Value

View source: R/simdata.R

Description

Lead or lag vectors or lists.

Usage

1
shift(x, n = 1L, type = "lag")

Arguments

x

a vector or list.

n

an integer denoting the offset by which to lead or lag the input. This function only supports n>=0.

type

Default is "lead" (look "forwards"). The other possible value is "lag" (look "backwards").

Value

An object with the same class as x that contains the lead/lag of input x.


jitonglou/MultiMlearn documentation built on Dec. 21, 2021, 12:08 a.m.