|
From: | Simone Gabbriellini |
Subject: | Re: [igraph] how to add vertex and edge attributes |
Date: | Tue, 30 Dec 2008 17:21:49 +0100 |
Thanks Tamas... I have another little question, if u have time:suppose I have an attribute of a node, a label with the name of the node, say "simone"
how can I retrive the index of the node with label == "simone"? I tried with: g.vs[id=="simone"] but doesn't work... I have no clue how to ask for the index... thanks, Simone Il giorno 29/dic/08, alle ore 23:28, Tamas Nepusz ha scritto:
Dear Simone,what is the right sintax to add vertex or edge attributes to a graph?It's as simple as: g.es[edgeidx]["prova"] = 1 Or if you want to assign attribute values to all the edges at once: g.es["prova"] = [1,2,3,4,5] (assuming that you have 5 edges) -- T. _______________________________________________ igraph-help mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/igraph-help
[Prev in Thread] | Current Thread | [Next in Thread] |