rotateVector: Circularly vector rotation

Description Usage Arguments Value See Also Examples

Description

Circularly rotates elememnts in a vector.

Usage

1
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

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

wconstan/ifultools documentation built on May 5, 2020, 1:28 a.m.