Description Usage Arguments Value See Also Examples
Circularly rotates elememnts in a vector.
1 | rotateVector(x, shift=1)
|
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. |
a numeric vector containing the result.
1 2 | rotateVector(1:5, 2)
rotateVector(1:5, -2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.