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)
a numeric vector
an integer, the number of indices to shift the input vector. Positive, shifts left; negative, shifts right.
a numeric vector