shifter | R Documentation |
Shift a vector left or right by a number of spaces. From: https://stackoverflow.com/a/30542172/1898713 library(SOfun); shifter(a)#'
shifter(x, n = 1)
x |
a numeric vector |
n |
an integer, the number of indices to shift the input vector. Positive, shifts left; negative, shifts right. |
a numeric vector
library(ARCOS)
ARCOS:::shifter(1:10, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.