Calculus                package:Rsac                R Documentation

_D_I_F_F_E_R_E_N_T_I_A_T_I_O_N _A_N_D _I_N_T_E_G_R_A_T_I_O_N

_D_e_s_c_r_i_p_t_i_o_n:

     Differentiation (by two-point differencing) and integration (by
     rectangular approximation) in the time domain. For
     differentiation, the begining time of the time series is increased
     by half the sampling interval, and the length of the record is
     decreased by 1. It is also usually a good idea to use the 'rtrend'
     or 'rmean' function before integration.

_U_s_a_g_e:

     dif(s)
     int(s)

_A_r_g_u_m_e_n_t_s:

       s: 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>

_S_e_e _A_l_s_o:

     'rtrend'

_E_x_a_m_p_l_e_s:

     data(srosa)
     getunits(srosa)
     # convert to cm/s/s
     srosa.accel <- dif(mul(srosa, 1e-7))

     amax <-  function(X)
       X$x <- max(abs(X$amp))

     pga <- max(sapply(X = srosa.accel, amax))
     # cm/s/s

     spect(srosa)

     srosa.disp <- int(rtrend(srosa))

     plot(srosa, xlim = c(100, 400))
     plot(srosa.disp, xlim = c(100, 400))
     srosa.disp <- hp(srosa.disp, c = 0.1)
     plot(srosa.disp, xlim = c(100, 400))
     spect(srosa.disp)

