igraph-help
[Top][All Lists]
Advanced

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

[igraph] vertex attribute assignment matching names


From: Bob Pap
Subject: [igraph] vertex attribute assignment matching names
Date: Mon, 17 Sep 2012 12:23:24 +0200

Dear all,
 
I found no help in the relevant pages for assigning vertex attributed _making sure that names are properly matched.  Example, V(g)$name lists 50 cities in a non-alphabetical order, whereas I have a data.frame with 50 lines and a 'name' column in alphabetical order having as columns additional vertex attreibutes I would like to assign.
 
Simply doing V(g)$size <- my.data.frame$size does not (as far as I can read from the help pages) guarantee that cities are properly matched by name (V(g)$name and my.data.frame$name respectively).
 
How can I specify that names are correctly mapped? Any suggestion is appreciated.
 
Kind regards,
Bob

reply via email to

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