groups | R Documentation |
Create a list of vertex groups from some graph clustering or community structure.
groups(x)
x |
Some object that represents a grouping of the vertices. See details below. |
Currently two methods are defined for this function. The default method
works on the output of components()
. (In fact it works on any
object that is a list with an entry called membership
.)
The second method works on communities()
objects.
A named list of numeric or character vectors. The names are just numbers that refer to the groups. The vectors themselves are numeric or symbolic vertex ids.
components()
and the various community finding
functions.
Community detection
as_membership()
,
cluster_edge_betweenness()
,
cluster_fast_greedy()
,
cluster_fluid_communities()
,
cluster_infomap()
,
cluster_label_prop()
,
cluster_leading_eigen()
,
cluster_leiden()
,
cluster_louvain()
,
cluster_optimal()
,
cluster_spinglass()
,
cluster_walktrap()
,
compare()
,
make_clusters()
,
membership()
,
modularity.igraph()
,
plot_dendrogram()
,
split_join_distance()
,
voronoi_cells()
g <- make_graph("Zachary")
fgc <- cluster_fast_greedy(g)
groups(fgc)
g2 <- make_ring(10) + make_full_graph(5)
groups(components(g2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.