igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] how to obtain vertex name


From: Tamás Nepusz
Subject: Re: [igraph] how to obtain vertex name
Date: Thu, 15 Mar 2012 10:14:13 +0100

> I then calculated the diameter and as I would like to identify the nodes 
> involved in this path I therefore used get.diameter(G18)
> It gave me numbers which correspond to my nodes of interest: 37 128 121 88 
> ... 
> I would like therefore to have the name of my nodes.

Use list.vertex.attributes(G18) to list the names of the vertex attributes in 
your graph. It could be the case that the names are stored in a different 
vertex attribute and not "name"; it all depends on how you saved the GraphML 
file from the software you were creating it with. That software could have 
stored the vertex names in "name", "Name", "label", "Label" or any other vertex 
attribute.

-- 
T.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]