Thank you Tamás for your help, I have implemented it and it works. If anyone 
else is interested in using it, I have put the code in the format of a 
function, which is as follows:

lvcent <- function(graph){

k <- degree(graph)
n <- vcount(graph)

sapply(1:n, function(v) { mean((k[v]-k[neighbors(graph,v)]) / 
(k[v]+k[neighbors(graph,v)])) }) 

}


Kind 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