I'm woking with R and the eigenvector centrality algorithm from the igraph library. We have the following sql table :
person1 / person2 / score
A / B / 0.568
A / C / 1.233
B / A / 0.798
B / C / 0.493
C / A / 1.367
C / B / 1.276
The values are a score for the relationship between the two person.
Two question : - How can I create a matrix in R from the table above with the score as a weight ? Result
Person A B C
A - 0.568 1.233
B 0.798 - 0.493
C 1.367 1.276 -
- How can we take into a consideration the weight of the relationship to apply eigenvector centrality algorithm in R?