Description Usage Arguments Value Author(s) References Examples
This function "shifts" the values of a vector by a specified amount. For instance, if you are starting with a vector, "x", where the range of values is between 1 and 10, and you want 10 to be replaced by 9, 9 to be replaced by 8, and so on, with 1 being ultimately replaced by 10, this funciton should be of use.
1 | shifter(x = 1:10, n = 1)
|
x |
The range that you are shifting |
n |
How much of a shift you want |
A vector of shifted values
Ananda Mahto
http://stackoverflow.com/a/20825012/1270695
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.