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)

