powered by
Extracts a named membership vector from a communities result. Works with both cograph_communities data frames and igraph communities objects.
cograph_communities
membership(x)
Named integer vector of community assignments.
A cograph_communities or igraph communities object.
g <- igraph::make_graph("Zachary") comm <- community_louvain(g) membership(comm)
Run the code above in your browser using DataLab