aggregateData           package:ifultools           R Documentation

_T_i_m_e _s_e_r_i_e_s _a_g_g_r_e_g_a_t_i_o_n

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

     Partitions data into blocks and and applies the specifed function
     to each of the bocks.

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

     aggregateData(x, by, FUN, moving=FALSE, ...)

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

       x: a numeric vector.

      by: .

     FUN: a scalar function to compute the summary statistics which can
          be applied to all data subsets.

     ...: additional arguments to pass to FUN.

  moving: either FALSE to do standard aggregation, or a positive
          integer N to perform a moving aggregation (normally used for
          a moving average) over N samples.

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

     the aggregated series.

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

     'aggregate'.

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

     ## Group a simple series into blocks containing 8 
     ## elements, and take the mean of each block. 
     ## Each block is lagged by 3 elements 
     aggregateData(1:30, by=3, FUN=mean, moving=8)

