powered by
Element wise shift of vectors by k positions.
k
shift(x, k = 1, ..., fill = NA)
A shifted vector object of the same type of provided object.
a vector object.
a numeric with the number of elements to shift the Term vector
additional arguments. Currently unused.
a numeric value (or NA) to fill the empty created by shifting a vector object.
NA
shift(1:10, fill = 0) t <- term(1:10, "months") shift(t)
Run the code above in your browser using DataLab