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)

