| rotate | R Documentation |
Changes which element of a circularly-ordered series is in the first position without otherwise changing the order. Used primarily to generate the modes of a scale. Single application moves one element from the beginning of a tuple to the end.
rotate(x, n = 1, transpose_up = FALSE, edo = 12)
x |
Vector to be rotated |
n |
Number of positions the vector should be rotated left.
Defaults to |
transpose_up |
Boolean, defaults to |
edo |
Number of unit steps in an octave. Defaults to |
(Rotated) vector of same length as x
rotate(c(0, 2, 4, 5, 7, 9, 11), n=2)
rotate(c(0, 2, 4, 5, 7, 9, 11), n=-2)
rotate(c(0, 2, 4, 5, 7, 9, 11), n=2, transpose_up=TRUE)
rotate(c(0, 2, 4, 5, 7, 9, 11), n=2, transpose_up=TRUE, edo=15)
rotate(c("father", "charles", "goes", "down", "and", "ends", "battle"),
n=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.