Stack Exchange
Finding tied rankings of eigenvector centralities using igraph
I'm not sure why the code below produces the same ranks for a command with no tie instructions, and a command using the average tie rank method. I'm using igraph to get the eigenvector centralities of a graph, negative rank to make the ranks go from largest to smallest. Seems like the output of the tied ranking line should be: 2,2,2,4.5,4.5
> eigen.test <- centr_eigen(raw.graphs[[126]])
> eigen.test$vector
[1] 1.0000000 1.0000000 1.0000000 0.8228757
[5] 0.8228757
> eigen.test$value
[1] 3.645751
> rank(-eigen.test$vector,ties.method = c("average"))
[1] 1 2 3 4 5
> rank(-eigen.test$vector)
[1] 1 2 3 4 5


This might be caused by the precision of numeric values. You can try round within your line like below
rank(-round(eigen.test$vector,8),ties.method = c("average"))

