Dear all,

I was kindly provided with a windows package for igraph 0.6, thank you Gábor 
Csárdi, to calculate the weighted betweenness centrality, however I am getting 
the error message: 

Error in betweenness(g1, weights = TRUE) : 
At centrality.c:1454 : Weight vector length does not match, Invalid value

I entered some of the code in the function manually: weights <- E(graph)$weight 

to check what the variable weights called is and the length, and it is:

length(weights)
[1] 31996000

Which is the same as:

ecount(g1)
[1] 31996000

I previously read that this error was due to the weights vector length not 
being equal to the number of edges in the graph, however this would not seem to 
be the case, using the code:  , which is contained within the betweenness 
function. I am calling the function as such:

wb1 <- betweenness(g1, weights = TRUE)

which I believe is the correct way. I am a little confused now as to why there 
is an error, could anyone help me with this?


Regards

Alex

___________________________________________________________________

         

Alex Upton, BEng, MRes, PG Cert Business Administration
PhD Researcher Biomedical Informatics, Signals and Systems 
School of Electronic, Electrical and Computer Engineering, 
College of Engineering and Physical Sciences, University of Birmingham
Edgbaston, Birmingham, B15 2TT, United Kingdom

Fax: +44 121 4144291 (school general office)
Email: [email protected]

Personal Web: http://postgrad.eee.bham.ac.uk/uptona/
__________________________________________________________________
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to