shift | R Documentation |
Given a vector, permute the elements with a cyclic permutation
shift(x,i=1)
x |
Vector |
i |
Integer, number of places to permute. Negative values mean to count from the end |
This function is that of the magic package, where it is motivated and discussed.
Returns a vector
Robin K. S. Hankin
shift(1:9)
shift(1:9,-1)
shift(1:9,2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.