communities              package:igraph              R Documentation

_C_o_m_m_o_n _f_u_n_c_t_i_o_n_s _s_u_p_p_o_r_t_i_n_g _c_o_m_m_u_n_i_t_y _d_e_t_e_c_t_i_o_n _a_l_g_o_r_i_t_h_m_s

_D_e_s_c_r_i_p_t_i_o_n:

     'community.to.membership' takes a merge matrix, a typical result
     of community structure detection algorithms and creates a
     membership vector by performing a given number of merges in the
     merge matrix.

_U_s_a_g_e:

     community.to.membership(graph, merges, steps, membership=TRUE, csize=TRUE)

_A_r_g_u_m_e_n_t_s:

   graph: The graph to which the merge matrix belongs.

  merges: The merge matrix, see e.g. 'walktrap.community' for the exact
          format.

   steps: The number of steps, ie. merges to be performed.

membership: Logical scalar, whether to include the membership vector in
          the result.

   csize: Logical scalar, whether to include the sizes of the
          communities in the result.

_V_a_l_u_e:

     A named list with two members: 

membership: The membership vector.

   csize: A numeric vector giving the sizes of the communities.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_S_e_e _A_l_s_o:

     'walktrap.community', 'edge.betweenness.community',
     'fastgreedy.community', 'spinglass.community' for various
     community detection methods.

_E_x_a_m_p_l_e_s:

     g <- graph.full(5) %du% graph.full(5) %du% graph.full(5)
     g <- add.edges(g, c(0,5, 0,10, 5, 10))
     wtc <- walktrap.community(g)
     community.to.membership(g, wtc$merges, steps=12)

