Get the name of the vertex in the igraph::transitivity(graph, type = "local") function in R

46 Views Asked by At

When I use the degree(graph) function from the igraph package in R, the output comes up with the name of the vertex and its respective value, however, when I run the transitivity(graph, type = "local") function from the same package, the output is a list without names, I can't tell which node each value corresponds to.

I expected the output of the transitivity(graph, type = "local") function to be accompanied by the name of the vertices.

1

There are 1 best solutions below

0
On

The result is always in the same order as the vid parameter you specified, or if vid is left at its default value, then in the same order as the vertex list returned by V(g).

This is true for all igraph functions, without exceptions.