clust2Mat              package:GraphAT              R Documentation

_F_u_n_c_t_i_o_n _t_o _c_o_m_p_u_t_e _a_d_j_a_c_e_n_c_y _m_a_t_r_i_x _o_f _c_l_u_s_t_e_r _g_r_a_p_h _g_i_v_e_n _a _v_e_c_t_o_r _o_f _c_l_u_s_t_e_r _m_e_m_b_e_r_s_h_i_p_s

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

     Given a list of cluster memberships, this function computes the
     adjacency matrix for the associated cluster graph.  The adjacency
     matrix is a matrix whose rows and columns are the nodes of the
     cluster graph and whose entries are 0's or 1's.  A 1 entry
     indicates that the corresponding nodes are connected, and a 0
     indocates that they are not.

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

     clust2Mat(memb)

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

    memb: A numeric vector, with each entry representing a node, the
          entry's value being the number of the cluster to which that
          node belongs.

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

     Given a vector of cluster membership numbers, where the number of
     entries is the number of nodes n, the function computes an nxn
     ``adjacency matrix'' for the corresponding cluster graph.  The
     cluster graph is the graph in which two nodes are connected by an
     edge if and only if they are members of the same cluster.  The
     adjacency matrix for the graph has rows and columns representing
     the nodes, in the same order as the input vector.  The (i,j) entry
     is 1 if and only if node i and node j are in the same cluster. 
     Otherwise, the entry is 0.  By convention, diagonal entries are 0.

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

     An nxn adjacency matrix for the cluster graph, where n=length of
     cluster membership input vector memb.

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

     Tom LaFramboise tlaframb@hsph.harvard.edu

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

     'makeClustM'

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

     memberships<-c(1,2,3,1,2,3,1,2,3,4)
     clust2Mat(memberships)

