rotateVector: Circularly vector rotation

rotateVectorR Documentation

Circularly vector rotation

Description

Circularly rotates elements in a vector.

Usage

rotateVector(x, shift=1)

Arguments

x

a vector.

shift

an integer denoting the shift (number of elements to circularly rotate). A negative value implies a negative (leftward) shift of the data.

Value

a numeric vector containing the result.

See Also

isVectorAtomic.

Examples

rotateVector(1:5, 2)
rotateVector(1:5, -2)

ifultools documentation built on July 14, 2022, 5:07 p.m.