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)

