interarrival              package:seas              R Documentation

_C_a_l_c_u_l_a_t_e _t_h_e _i_n_t_e_r_a_r_r_i_v_a_l_s _b_e_t_w_e_e_n _a_n_d _w_i_t_h_i_n _p_r_e_c_i_p_i_t_a_t_i_o_n _e_v_e_n_t_s

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

     Calculate the interarrivals (or spell periods), which are the
     number of days between precipitation events (dry days), and the
     number of days of continuous precipitation (wet days).

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

     # minimum
     interarrival(x)

     # with optional arguments
     interarrival(x, var = "precip", p.cut = 0.3, inv = FALSE)

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

       x: a 'data.frame' with 'Date' and 'var' columns of data; 'x' can
          also have 'id' or 'name' attributes

     var: a variable on to which the interarrivals are calculated;
          default is '"precip"'

   p.cut: days with precipitation values greater than 'p.cut' are
          considered to be _wet_ days, and the complement are _dry_
          days; a trace amount of 0.3 mm is suggested

     inv: 'logical'; invert convention of the starting date such that
          the date is the first _wet_ day if 'inv=FALSE' (default), or
          the date is the first _dry_ day if 'inv=TRUE'

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

     The interarrival is the same as the _spell_ period (i.e., dry
     spell), however this function simultaneously counts the number of
     _dry_ and _wet_ days relative to a single date. The date
     represents the first day of precipitation (if 'inv=TRUE', this
     convention is inverted to the first day of non-precipitation).

     Missing or 'NA' precipitation values voids the number of counted
     days between and within segments, which implies that days without
     precipitation need to explicitly have zeros.

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

     'interarrival' object (which inherits the 'data.frame' class) with
     'date', 'wet', 'dry' columns.

     The table has 'id' and 'name' attributes (if available from 'x').

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

     M.W. Toews

_R_e_f_e_r_e_n_c_e_s:

     von Storch, H. and Zwiers, F.W., 1999, _Statistical analysis in
     climate research_, Cambridge: Cambridge University Press, 484 p.

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

     'plot.interarrival'

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

     data(mscdata)

     van.int <- interarrival(mksub(mscdata,id=1108447))
     summary(van.int)
     van.int[which.max(van.int$dry),]
     van.int[which.max(van.int$wet),]

     plot(van.int, ylog=FALSE, maxy=30)

