aggregate              package:fSeries              R Documentation

_t_i_m_e_S_e_r_i_e_s _C_l_a_s_s, _F_u_n_c_t_i_o_n_s _a_n_d _M_e_t_h_o_d_s

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

     Computes Summary Statistics of Data Subsets

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

     ## S3 method for class 'timeSeries':
     aggregate(x, by = c("monthly", "quarterly"), 
         FUN = colMeans, units = NULL, ...)

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

      by: [aggregate] - 
           a character string denoting the aggregation period, either 
          '"monthly"' or '"quarterly"'. 

     FUN: the function to be applied. 

   units: an optional character string, which allows to overwrite the 
          current column names of a 'timeSeries' object. By default 
          'NULL' which means that the column names are selected
          automatically. 

       x: an object of class 'timeSeries'. 

     ...: arguments passed to other methods. 

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

     returns an aggregated S4 object of class 'timeSeries'.

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

     Diethelm Wuertz for the Rmetrics R-port.

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

     ## data - 
        x = as.timeSeries(data(msft.dat))
        
     ## aggregate -
        aggregate(x)   

