从一些图聚类或社群结构创建一个顶点组的列表。
详细信息
目前为此函数定义了两种方法。默认方法适用于 components()
的输出。(实际上,它适用于任何具有名为 membership
的条目的列表对象。)
第二种方法适用于 communities()
对象。
参见
components()
和各种社群发现函数。
社群检测 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)
#> $`1`
#> [1] 1 5 6 7 11 12 17 20
#>
#> $`2`
#> [1] 9 15 16 19 21 23 24 25 26 27 28 29 30 31 32 33 34
#>
#> $`3`
#> [1] 2 3 4 8 10 13 14 18 22
#>
g2 <- make_ring(10) + make_full_graph(5)
groups(components(g2))
#> $`1`
#> [1] 1 2 3 4 5 6 7 8 9 10
#>
#> $`2`
#> [1] 11 12 13 14 15
#>