combine               package:Biobase               R Documentation

_M_e_t_h_o_d_s _f_o_r _F_u_n_c_t_i_o_n _c_o_m_b_i_n_e _i_n _P_a_c_k_a_g_e '_B_i_o_b_a_s_e'

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

     This generic function handles methods for combining or merging
     different Bioconductor data structures. It should, given an
     arbitrary number of arguments of the same class (possibly by
     inheritance), combine them into a single instance in a sensible
     way (some methods may only combine 2 objects, ignoring '...' in
     the argument list; because Bioconductor data structures are
     complicated, check carefully that 'combine' does as you intend).

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

     combine(x, y, ...)

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

       x: One of the values. 

       y: A second value. 

     ...: Any other objects of the same class as 'x' and 'y'. 

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

     There are two basic combine strategies. One is an intersection
     strategy. The returned value should only have rows (or columns)
     that are found in all input data objects. The union strategy says
     that the return value will have all rows (or columns) found in any
     one of the input data objects (in which case some indication of
     what to use for missing values will need to be provided).

     These functions and methods are currently under construction.
     Please let us know if there are features that you require.

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

     A single value of the same class as the most specific common
     ancestor (in class terms) of the input values. This will contain
     the appropriate combination of the data in the input values.

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

     '_c_o_m_b_i_n_e(_d_a_t_a._f_r_a_m_e, _d_a_t_a._f_r_a_m_e)' Combines two 'data.frame'
          objects so that the resulting 'data.frame' contains all rows
          and columns of the original objects. Rows and columns in the
          returned value are unique, that is, a row or column
          represented in both arguments is represented only once in the
          result. To perform this operation, 'combine' makes sure that
          data in shared rows and columns is identical in the two
          data.frames. Data diffrences in shared rows and columns cause
          an error. 'combine' issues a warning when a column is a
          'factor' and the levels of the factor in the two
          'data.frame's are different; the returned value may be
          recoded.

     Additional 'combine' methods are defined for 'AnnotatedDataFrame',
     'AssayData', 'MIAME', and 'eSet' classes and subclasses.

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

     Biocore

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

     'merge'

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

       x <- data.frame(x=1:5,
               y=factor(letters[1:5], levels=letters[1:7]),
               row.names=letters[1:5])
       y <- data.frame(z=3:7,
               y=factor(letters[3:7], levels=letters[1:7]),
               row.names=letters[3:7])
       combine(x,y)

       # y is converted to 'factor' with different levels
       x <- data.frame(x=1:5,y=letters[1:5], row.names=letters[1:5])
       y <- data.frame(z=3:7,y=letters[3:7], row.names=letters[3:7])
       try(combine(x,y))

