orderColnames            package:fSeries            R Documentation

_R_e_o_r_d_e_r_s _c_o_l_u_m_n _n_a_m_e_s _o_f _a _t_i_m_e _s_e_r_i_e_s

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

     A collection and description of functions  and methods dealing
     with the rearrangement of column names of 'timeSeries' objects.  

       'orderColnames'   Returns ordered column names of a time Series,
       'sortColnames'    Returns sorted column names of a time Series,
       'sampleColnames'  Returns sampled column names of a time Series,
       'statsColnames'   Returns statistically rearranged column names,
       'pcaColnames'     Returns PCA correlation ordered column names,
       'hclustColnames'  Returns hierarchical clustered column names.

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

     orderColnames(x, ...)
     sortColnames(x, ...)  
     sampleColnames(x, ...) 
     statsColnames(x, FUN = colMeans, ...)
     pcaColnames(x, robust = FALSE, ...)
     hclustColnames(x, method = c("euclidean", "complete"), ...)

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

     FUN: a character string indicating which statistical function 
          should be applied. By default statistical ordering operates 
          on the column means of the time series. 

  method: a character string with two elements. The first determines
          the choice of the distance measure, see 'dist', and the
          second determines the choice of the agglomeration method, see
          'hclust'. 

  robust: a logical flag which indicates if robust correlations should
          be used. 

       x: an object of class 'timesSeries' or any other rectangular 
          object which can be transformed by the function 'as.matrix'
          into a numeric matrix.  

     ...: further arguments to be passed, see details. 

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

     *Statistically Motivated Rearrangement* 

     The function 'statsColnames' rearranges the column names according
     to a statical measure. These measure must operate on the columns
     of the time series and return a vector of values which can be
     sorted. Typical functions ar those listed in in help page
     'colStats' but one can also crete his own functions which compute
     for example risk or any other statistical measure. The '...'
     argument allows to pass additional arguments to the underlying
     function 'FUN'.

     *PCA Ordering of the Correlation Matrix* 

     The function 'pcaColnames' rearranges the column names according
     to the PCA ordered correlation matrix. The argument 'robust'
     allsows to select between the use of the standard 'cor' and
     computation of robust correlations using  the function 'covMcd'
     from contributed R package 'robustbase'. The '...' argument allows
     to pass  additional arguments to the two underlying functions
     'cor'  or 'covMcd'. E.g. adding 'method="kendall"'  to the
     argument list calculates Kendall's rank correlations instead the
     default which calculates Person's correlations.

     *Ordering by Hierarchical Clustering* 

     The function 'pcaColnames' uses the hierarchical clustering
     approach 'hclust' to rearrange the column names of the time
     series.

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

     returns a vector of character string, the rearranged column names.

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

     Diethelm Wuertz for the Rmetrics R-port.

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

     ## data - 
        edhec = as.timeSeries(data(edhec))
        colnames(edhec) = abbreviate(colnames(edhec), 6)

     ## sortColnames -
        # Sort alphabetically
        sortColnames(edhec)
       
     ## hclustColnames -
        head(edhec[, hclustColnames(edhec)])  

