Learn R Programming

wavethresh (version 4.7.3)

rotateback: Cyclically shift a vector one place to the right

Description

Cyclically shifts the elements of a vector one place to the right. The right-most element becomes the first element.

Usage

rotateback(v)

Value

The rotated vector

Arguments

v

The vector to shift

Author

G P Nason

Details

Subsidiary function used by the av.basis function which is the R function component of the AvBasis.wst function.

Examples

Run this code
#
# 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