R/plot_comm_dendrogram.R
extract_comm_fastgreedy.Rd
Extract communities via greedy optimization of modularity
extract_comm_fastgreedy(
x,
weights = NA,
modularity = TRUE,
merges = TRUE,
membership = TRUE
)
The undirected input graph, edge directions are ignored in directed graphs.
The weights of the edges. It must be a positive numeric vector,
NULL
or NA
. If it is NULL
and the input graph has a
‘weight’ edge attribute, then that attribute will be used. If NULL
and
no such attribute is present, then the edges will have equal weights.
Set this to NA
if the graph was a ‘weight’ edge attribute, but you
don't want to use it for community detection. Larger edge weights increase
the probability that an edge is selected by the random walker.
In other words, larger edge weights correspond to stronger connections.
Logical scalar, whether to include the vector of the
modularity scores in the result. If the membership argument is TRUE
,
then it will always be calculated.
Logical scalar, whether to include the merge matrix in the result.
Logical scalar, whether to calculate the membership vector for the split corresponding to the highest modularity value.
a communities
object
NOTE: this algorithm only works with undirected graphs.
This function tries to find dense subgraph, also called communities in graphs via directly optimizing a modularity score.
The result of this function can be queried using the utility functions
documented here: membership
,
this function just wraps the cluster_fast_greedy
function and documentation.