combineData               package:HELP               R Documentation

_C_o_m_b_i_n_e _d_a_t_a

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

     Calculate trimmed and/or weighted means of groups of rows in a
     given data matrix.

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

     combineData(x, y, w, ...)

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

       x: a numeric matrix containing the values whose trimmed and/or
          weighted mean is to be computed. Each column is treated
          independently. 

       y: a vector describing the discrete groups used to divide the
          elements of x.  If y is missing then all elements of x are
          handled together. 

       w: a matrix of weights the same dimensions as x giving the
          weights to use for each element of x. If w is missing then
          all elements of x are given the same weight. 

     ...: Arguments to be passed to methods (see
          'combineData-methods'): 

          '_t_r_i_m' the fraction (0 to 0.5, default is 0) of observations
               to be trimmed from each group of rows in 'x' according
               to 'y'. 

          '_n_a._r_m' logical; if 'TRUE', missing values are removed from
               'x' and 'y' and 'z'. If 'FALSE' any missing values cause
               an error.

          '_e_l_e_m_e_n_t' which element of 'AssayData' to use for a given
               'ExpressionSet' input (default is '"exprs"') 

          '_f_e_a_t_u_r_e._g_r_o_u_p' which element of 'featureData' to use as
               binning variable (default is 'NULL'). Can be a character
               matching 'varLabel' or simply an integer indicating
               which feature to choose. See 'getFeatures'. 

          '_e_l_e_m_e_n_t._w_e_i_g_h_t' which element of 'AssayData' to use for a
               given 'ExpressionSet' input.  If 'NULL' (default),
               weighting is not performed. 

          '_f_e_a_t_u_r_e._w_e_i_g_h_t' which element of 'featureData' to use as
               weighting variable (default is 'NULL'). Can be a
               character matching 'varLabel' or simply an integer
               indicating which feature to choose. See 'getFeatures'. 

          '_s_a_m_p_l_e_s' which samples to use as data. Can be a vector of
               characters matching sample names, integers indicating
               which samples to choose, or a mixture of the two. If
               'NULL' (default), all samples will be used.

          '...' other arguments not handled at this time.  

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

     Returns a matrix of combined numerical data, where each row
     represents the summary of a group of elements from the
     corresponding column in x.

_N_o_t_e:

     Each column in data matrix treated separately.

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

     Reid F. Thompson (rthompso@aecom.yu.edu)

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

     'combineData-methods', 'mean', 'weighted.mean'

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

     #demo(pipeline,package="HELP")

     x <- 1:100
     combineData(x,w=x/100)
     weighted.mean(x,w=x/100)

     y <- sample(c("a","b","c",1:3),size=100,replace=TRUE)
     combineData(cbind(x,x,2*x),y,trim=0.5)

     #rm(x,y)

