R/plot_comm_dendrogram.R
extract_comm_walktrap.Rd
Extract communities using the walktrap algorithm
extract_comm_walktrap(
x,
weights = NA,
steps = 4,
modularity = TRUE,
merges = TRUE,
membership = TRUE
)
The 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.
The length of the random walks to perform.
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
Find community structure in the graph by using random walks across the edges of the graph. The idea is that short random walks tend to stay in the same community.
The result of this function can be queried using the utility functions
documented here: membership
,
this function just wraps the cluster_walktrap
function and documentation.