Hierarchical agglomeration by greedy modularity optimization, which produces a dendrogram of community merges. A directed graph is collapsed to an undirected graph with summed edge weights.
Usage
community_fast_greedy(
x,
weights = NULL,
merges = TRUE,
modularity = TRUE,
membership = TRUE,
...
)
com_fg(
x,
weights = NULL,
merges = TRUE,
modularity = TRUE,
membership = TRUE,
...
)Arguments
- x
Network input.
- weights
Edge weights.
NULLuses the network weights andNAruns unweighted. Negative weights are replaced by their absolute values.- merges
Logical. Whether igraph stores the merge matrix. Default
TRUE.- modularity
Logical. Whether igraph stores the modularity scores. Default
TRUE.- membership
Logical. Whether igraph computes the membership vector. Default
TRUE.- ...
Passed to
to_igraph, whose only other argument isdirected; anything else raises an "unused argument" error.
Value
A cograph_communities data frame with columns
node and community. The igraph communities result,
including the merge dendrogram when merges = TRUE, is kept in the
"igraph_result" attribute.
