| fastgreedy.community {igraph} | R Documentation |
This function tries to find dense subgraph, also called communities in graphs via directly optimizing a modularity score.
fastgreedy.community(graph, merges=TRUE, modularity=TRUE,
membership=TRUE, weights=E(graph)$weight)
graph |
The input graph |
merges |
Logical scalar, whether to return the merge matrix. |
modularity |
Logical scalar, whether to return a vector containing the modularity after each merge. |
membership |
Logical scalar, whether to calculate the membership vector corresponding to the maximum modularity score, considering all possible community structures along the merges. |
weights |
If not |
This function implements the fast greedy modularity optimization algorithm for finding community structure, see A Clauset, MEJ Newman, C Moore: Finding community structure in very large networks, http://www.arxiv.org/abs/cond-mat/0408187 for the details.
fastgreedy.community returns a communities
object, please see the communities manual page for
details.
Tamas Nepusz ntamas@gmail.com and Gabor Csardi csardi.gabor@gmail.com for the R interface.
A Clauset, MEJ Newman, C Moore: Finding community structure in very large networks, http://www.arxiv.org/abs/cond-mat/0408187
communities for extracting the results.
See also walktrap.community,
spinglass.community,
leading.eigenvector.community and
edge.betweenness.community for other methods.
g <- graph.full(5) %du% graph.full(5) %du% graph.full(5) g <- add.edges(g, c(1,6, 1,11, 6, 11)) fc <- fastgreedy.community(g) membership(fc) sizes(fc)