powered by
Cyclically shifts the elements of a vector one place to the right. The right-most element becomes the first element.
rotateback(v)
The rotated vector
The vector to shift
G P Nason
Subsidiary function used by the av.basis function which is the R function component of the AvBasis.wst function.
av.basis
AvBasis.wst
# # Here is a test vector # v <- 1:10 # # Apply this function # rotateback(v) #[1] 10 1 2 3 4 5 6 7 8 9 # # A silly little function really!
Run the code above in your browser using DataLab