igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] need name of vertices with their numerical ids.


From: Gábor Csárdi
Subject: Re: [igraph] need name of vertices with their numerical ids.
Date: Tue, 16 Jul 2013 09:15:19 -0400

On Tue, Jul 16, 2013 at 3:03 AM, Alexander Struck <address@hidden> wrote:

On Jul 15, 2013, at 11:33 PM, Swati Sinha <address@hidden> wrote:

>
> How do I get the list of vertices with their name as well as numerical ids?
Assuming you are using R
>
> Any help.
You may want to read the fine manual here: http://igraph.sourceforge.net/doc/R/attributes.html

And remember that numeric ids are just 1 to number of vertices, so what you want it something like

cbind(seq_len(vcount(g)), V(g)$name)

This is not a list, but a matrix, but you'll get the idea.

G.
 


Best,
Alexander

>
> Swati
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help



Image Knowledge Gestaltung. An Interdisciplinary Laboratory
Cluster of Excellence Humboldt-Universität zu Berlin

Alexander Struck
Shaping Knowledge

Phone: +49 30 2093 46192
E-Mail:  address@hidden
URL:  www.interdisciplinary-laboratory.hu-berlin.de

Street Address: Sophienstrasse 22a, D-10178 Berlin
Postal Address: Unter den Linden 6, D-10099 Berlin


_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help


reply via email to

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