twoWayTable               package:SLGI               R Documentation

_G_e_n_e_r_a_t_e _t_w_o-_w_a_y _t_a_b_l_e _f_o_r _g_e_n_e_t_i_c _i_n_t_e_r_a_c_t_i_o_n _d_a_t_a

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

     Generate two-way table from a vector of genetic interaction status
     and a vector of the pairs that share a functional domain.

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

     twoWayTable(var1, var2idx)

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

    var1: Vector of the status of the first property. 

 var2idx: Vector of the index in 'var1' that have the second property. 

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

     Calculates the count numbers from the given vectors. Then put them
     into a matrix format.

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

     A two-way contingency table of genetic interaction and whether
     sharing a functional domain.

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

     Z. Jiang

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

     'sharedBy', 'getUniquePairs'

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

     var1 <- c(0,1,1,0,0,0,1,0,1,1)
     var2idx <- c(3,5,7)
     twoWayTable(var1,var2idx)

     data("AtongFnDomain")
     pf <- Biobase::reverseSplit(AtongFnDomain$SharedPfam)
     idx <- which(rownames(AtongFnDomain$pairs) %in% pf$PF00478)
     twoWayTable(AtongFnDomain$pairs[,"interact"],idx)

