I am trying to create a dendrogram of the communities only of a network. The example code below gives me a dendrogram of all the nodes, but as I work with a relatively large dataset, I would like to create a dendrogram of only the comunities,so that I would have a smaller dendrogram with only the communities, is this possible?
library(igraph)
set.seed(1)
g001 <- erdos.renyi.game(100, 1/10, directed = FALSE)
fc01 <- fastgreedy.community(g001)
colors <- rainbow(max(membership(fc01)))
plot(g001, vertex.size=2, vertex.label=NA, vertex.color=colors[membership(fc01)] )
dendPlot(fc01, mode="phylo", cex=1)
Thank you.