Skip to content
Prev 138549 / 398506 Next

vertex labels in igraph from adjacency matrix

On Wed, Mar 05, 2008 at 02:27:21AM -0500, Charilaos Skiadas wrote:
[...]
This is almost good, but there is a catch, in igraph vertices are 
numbered from zero. So if you want an igraph vertex id, then you 
need to subtract one from this, i.e.:

maxb <- which.max(betweennness(my.graph, directed=FALSE))-1

You can double check it:

betweenness(my.graph, maxb, directed=FALSE)

Gabor

PS. there is also an igraph mailing list, see the igraph homepage
at igraph.sf.net
[...]