How can I access the ids of the top3 connected components of a graph in igraph
?
c <- igraph::components(g, mode = 'weak')
which(c$membership == which.max(c$csize))
will give the largest and
which(c$membership == which.max(c$csize-1))
the same result as c$csize-1
will just subtract -1 from all values.