aggregate-methods        package:surveillance        R Documentation

_A_g_g_r_e_g_a_t_e _t_h_e _t_h_e _s_e_r_i_e_s _o_f _a_n _s_t_s _o_b_j_e_c_t

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

     Method to aggregate the matrix slots of an sts object. Either the
     time series is aggregated so a new sampling frequency of 'nfreq'
     units per time slot is obtained - i.e as in 'aggregate.ts'. The
     other option is to aggregate over all 'ncol' units.

     Note: The function is not 100% consistent with what the generic
     function 'aggregate' does.

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

     Warning: In case the aggregation is by unit the upperbound slot is
     set to NA. Furthermore the MAP object is left as  is, but the
     object cannot be plotted anymore.

_M_e_t_h_o_d_s:


          _x an object of class 'sts'

          _b_y a string being either "time" or "unit"

          _n_f_r_e_q new sampling frequency if 'by=="time"'. If
               'nfreq=="all"' then all time instances are summed.

          ... not used

          returns an object of class 'sts'


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

     'aggregate'

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

       data(ha)
       has4 <- disProg2sts(ha)
       dim(has4)
       dim(aggregate(has4,by="unit"))
       dim(aggregate(has4,nfreq=13))

