rtrend                 package:Rsac                 R Documentation

_R_E_M_O_V_E _L_I_N_E_A_R _T_R_E_N_D _O_R _M_E_A_N

_D_e_s_c_r_i_p_t_i_o_n:

     Removes the linear trend or mean from SAC data. Note that defailt
     of "spect" is to detrend because that is the default for
     'spec.pgram' (see example below).

_U_s_a_g_e:

     rtrend(x)
     rmean(x)

_A_r_g_u_m_e_n_t_s:

       x: an object of class '"rsac"'.

_V_a_l_u_e:

     same as input.

_A_u_t_h_o_r(_s):

     Eric M. Thompson <eric.thompson@tufts.edu>

_E_x_a_m_p_l_e_s:

     x <- rsac.skeleton(1)
     x[[1]]$amp <- runif(1e3) 
     x[[1]]$dt <- 1

     plot(x)

     # DC offset:
     spect(x, detrend = FALSE)

     # Default detrends, removing DC:
     spect(x)

