Dear all,
I am pretty new to igraph and R, and having some difficulties (long time Stata and SAS user). I have a graph of roughly 32000 vertices, which has a largest component of around 6200 connected nodes. All I want to do is to extract this as a new igraph object, and calculate some basic network metrics such as density, mean degree centrality etc.
I have tried to various things which have been suggested before in this list, such as:
giant.component <- function(graph, ...) {
cl <- clusters(graph, ...)
subgraph(graph, which(cl$membership == which.max(cl$csize)-1)-1)
}
tail.component <- function(graph, ...) {
cl <- clusters(graph, ...)
subgraph(graph, which(cl$membership != which.max(cl$csize)-1)-1)
}
But could not get the code to work. I have been mainly playing with induce.subgraph and decompose.
Any help is greatly appreciated.
Warm wishes,
ali