Hi,
> I have a graph:
> [...]
> and I'd like to output a list of all the node numbers beside their name,
> something like:
> [...]
> How do I do this please?
It is not clear from your question whether you are using igraph from Python or
R, so I'l answer both. In R, the easiest way is probably as follows:
> data.frame(name=V(g)$name)
which simply exploits the fact that printing a data.frame yields the output
format that you want.
In Python, you can do this:
for vertex in g.vs:
print vertex.index, vertex["name"]
--
Tamas
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help