views:

171

answers:

1

I have a network loaded into an igraph object G that has 198 vertices and 214 edges. If I run:

eig<-evcent(G)$vector

The resulting eig is a vector with 2172 elements, rather than 198 elements. The documentation on the package claims it returns the "centralities of positions v." Any ideas on how to get the eigenvalue centralities for each vertex?

+2  A: 

This answer was recently asked (and answered) on the mailing list.

Check out this thread "Eigenvector Centrality" thread. It looks like a recompile of the R/igraph library might be in order, but should be rather straight forward.

Steve Lianoglou
That thread has another problem that I forgot to mention: the centralities reported are all < 0. I will try this approach, though I have yet to recompile anything in R + MacOS X before.
Mike
Compiling R on mac is very easy. Just make sure you have the latest version of XCode for your OS, and grab and install the gfortran installer from here (igraph doesn't use fortran, but other packages do): http://cran.r-project.org/bin/macosx/tools/gfortran-4.2.3.dmg
Steve Lianoglou
It would be nice to know if a recompile fixes this issue. As of R2.10.1 on MacOS X, the options parameter to evcent(...), documented here http://igraph.sourceforge.net/doc/R/evcent.html, ignores most anything you throw in there, including the $start setting mentioned in the forum post.
ayman
I don't think the thread explains the behavior, actually. The thread talks about conditions under which the "wrong" eigenvector is found; the current question is about why a result with an unexpected form (2172 elements rather than 198 elements) is returned.
Ken Williams