shift                  package:emu                  R Documentation

_F_u_n_c_t_i_o_n _t_o _s_h_i_f_t _t_h_e _e_l_e_m_e_n_t_s _o_f _a _v_e_c_t_o_r.

_D_e_s_c_r_i_p_t_i_o_n:

     The function makes use of the function 'fitler' to delay or
     advance a signal by k points.

_U_s_a_g_e:

     shift(x, delta = 1, circular = TRUE)

_A_r_g_u_m_e_n_t_s:

       x: A numeric vector 

   delta: A single element numeric vector. Defines the number of points
          by which the signal should be shifted. 

circular: Logical. If T, the signal is wrapped around itself so that if
          delta = 1, x[n] becomes x[1]. Otherwise, if delta is
          positive,  the same number of zeros are prepended to the
          signal 

_D_e_t_a_i_l_s:

     The function makes use of the function 'filter' for linear
     filtering to carry out the shifting.

_V_a_l_u_e:

     The signal shifted by a certain number of points. ...

_A_u_t_h_o_r(_s):

     Jonathan Harrington

_S_e_e _A_l_s_o:

     filter

_E_x_a_m_p_l_e_s:

     vec = 1:10
     shift(vec, 2)
     shift(vec, -2)
     shift(vec, 2, circular=FALSE)

