powered by
This function shifts a vector input a certain number of places in the direction desired.
shift(v, places, dir = "right")
a vector of input values.
the number of places to shift v.
v
The direction to shift v.
the shifted version of v.
The function shifts the vector v by places in the direction of direction, using wrapping at the boundaries. Used for cycle spinning.
places
direction
# NOT RUN { v<-runif(10) #have a look at v: v #now shift the values 4 places to the right... shift(v,4,dir="right") # }
Run the code above in your browser using DataLab