powered by
Shift a vector to the left or right by a certain amount (i.e. perform a simple phase shift).
shift.vec(shift, vec)
Amount of samples to shift vector in either the positive or negative direction.
Vector to shift.
Shifted vector.
The shift is accomplished by padding the head or tail of the vector with NA values.
NA
# NOT RUN { ## generate a delta function vec=rep(0,5) vec[3] = 1 ## shift vector by -2 new.vec = shift.vec(-2,vec) # }
Run the code above in your browser using DataLab