shift.vector: shift values in a vector

Description Usage Arguments Examples

View source: R/utils.R

Description

returns a vector with the same length as the original one, all values are shifted by a specified amount of positions, at one end NA values are introduced.

Usage

1

Arguments

v

the vector that has to be shifted

by

the amount of positions.

Examples

1
2
shift.vector(c(1,2,3), 1)
shift.vector(c(1,2,3), -1)

delftfews documentation built on May 2, 2019, 4:48 p.m.