R igraph: how to find the largest community?
问题 I use fastgreedy.community to generate a community object, which contains 15 communities. But how can I extract the largest community among these 15 communities? Community sizes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1862 1708 763 974 2321 1164 649 1046 2 2 2 2 2 2 15 2 In this example, I want to extract the community 5 for further use. Thanks! 回答1: Assuming that your community object is named community.object , which(membership(community.object) == x) extracts the indices of the vertices in