merge                 package:CALIB                 R Documentation

_M_e_r_g_e _R_G_L_i_s_t__C_A_L_I_B _o_r _S_p_i_k_e_L_i_s_t _o_b_j_e_c_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Merge two 'RGList_CALIB' objects or two 'SpikeList' objects  in
     possibly irregular order.

_U_s_a_g_e:

      ## S3 method for class 'RGList_CALIB':
      merge(x,y,...)

_A_r_g_u_m_e_n_t_s:

       x: an 'RGList_CALIB' object or an 'SpikeList' object.

       y: corresponding 'RGList_CALIB' object or 'SpikeList'  object.
          Has the same genes or spikes as 'x', possibly in a different
          order,but with different arrays. 

     ...: other arguments can be used in 'merge' in the base packge.

_D_e_t_a_i_l_s:

     'RGList_CALIB' and 'SpikeList'  objects are list objects
     containing numeric matrices with the same dimensions.  The
     RGLists_CALIB or SpikeLists are merged by merging each of the
     components by row  names or, if there are no row names, by IDs in
     the 'genes' component. Unlike when using 'cbind', row names are
     not required to be in the same order or to be unique. In the case
     of repeated row names, the order of the rows with  repeated names
     in preserved. This means that the first occurrence of each name 
     in 'x$R' is matched with the first occurrence of the same name in
     'y$R', the second with the second, and so on. The final vector of
     row names is the same  as in 'x'.

_V_a_l_u_e:

     An merged object of the same class as 'x' and 'y' with the same
     components as 'x'. Components matrices have the same row names as
     in 'x' but columns from 'y' as well as 'x'.

_N_o_t_e:

     If the 'RGList_CALIB' or 'SpikeList' objects contain the same
     number of genes  or spikes in the same order then the appropriate
     function to combine them is  'cbind' rather than 'merge'.

_A_u_t_h_o_r(_s):

     Hui Zhao

_R_e_f_e_r_e_n_c_e_s:

     'merge' in limma package

_S_e_e _A_l_s_o:

     'merge' in the base package

     'merge' in the limma package

_E_x_a_m_p_l_e_s:

     R1 <- G1 <- matrix(1:8,4,2)
     rownames(R1) <- rownames(G1) <- c("g1","g1","g2","g3")
     colnames(R1) <- colnames(G1) <- c("a1","a2")
     RG1 <- new("RGList_CALIB",list(R=R1,G=G1))

     R2 <- G2 <- matrix(9:16,4,2)
     rownames(R2) <- rownames(G2) <- c("g2","g3","g1","g1")
     colnames(R2) <- colnames(G2) <- c("a3","a4")
     RG2 <- new("RGList_CALIB",list(R=R2,G=G2))

     RG12 <- merge(RG1,RG2)
     RG21 <- merge(RG2,RG1)

