powered by
Given a vector, permute the elements with a cyclic permutation
shift(x,i=1)
Returns a vector
Vector
Integer, number of places to permute. Negative values mean to count from the end
Robin K. S. Hankin
This function is that of the magic package, where it is motivated and discussed.
shift(1:9) shift(1:9,-1) shift(1:9,2)
Run the code above in your browser using DataLab