shift {binhf} | R Documentation |
This function shifts a vector input a certain number of places in the direction desired.
shift(v, places, dir = "right")
v |
a vector of input values. |
places |
the number of places to shift v. |
dir |
The direction to shift v. |
The function shifts the vector v by places in the direction of direction, using wrapping at the boundaries. Used for cycle spinning.
vnew |
the shifted version of v. |
Matt Nunes (m.nunes@ucl.ac.uk)
v<-runif(10)
#have a look at v:
v
#now shift the values 4 places to the right...
shift(v,4,dir="right")