list2Matrix              package:ScISI              R Documentation

_A _f_u_n_c_t_i_o_n _t_o _t_h_a_t _m_a_p_s _a _l_i_s_t _r_e_p_r_e_s_e_n_t_a_t_i_o_n _o_f _a       
_h_y_p_e_r_g_r_a_p_h (_e_q_u_i_v_a_l_e_n_t_l_y _a _b_i_p_a_r_t_i_t_e _g_r_a_p_h) _g_r_a_p_h 
_t_o _i_t_s _c_o_r_r_e_s_p_o_n_d_i_n_g _s_p_a_r_s_e-_m_a_t_r_i_x _r_e_p_r_e_s_e_n_t_a_t_i_o_n.

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

     This function takes a named list representation of a  hyper-graph
     (bipartite graph) and generates the  sparse-matrix representation.
     Each entry of the list is a character vector corresponding to a
     hyper-edge. The character vector represents the vertices of 
     hyper-graph.

     There are a few caveats:

     1. The names of the list must be unique. 2. Each hyper-edge must
     also be unique.

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

     list2Matrix(hgList)

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

  hgList: A named list consisting of character vectors. Each element of
          the list corresponds to a hyper-edge of the hyper-graph, and
          the names of the list determine each hyper-edge. The vectors
          contain the vertices of the hyper-graphs. NB - the names of
          the  hyper-edges must all be distinct.

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

     A sparse-matrix representation of the hyper-graph. The rows of
     this matrix are indexed by the union of the elements of the list
     (i.e. the vertices of the graph). The columns are indexed by the
     hyper-edges. A value of 1  in the (i,j) position states that
     vertex i belongs to hyper-edge j, and  a value of 0 otherwise.

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

     Tony Chiang

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

     hgList = getGOInfo(wantAllComplexes = FALSE)
     list2Matrix(hgList)

