Re: [R] Add attributes to igraph vector by name, not index

2012-04-26 Thread Gábor Csárdi
Hi, you can iterate over the vertices, but it'll be probably slow. The best solution is to create the graph directly from the data frame(s) containing all structure and attribute data. See the graph.data.frame() function for this. Btw. it might be worth to post your igraph related questions to t

[R] Add attributes to igraph vector by name, not index

2012-04-23 Thread cwdillon
Hi, So I've been figuring out how to use igraph in R and like it for it's speed and simplicity. Now I have a graph built from an edgelist where vectors have a $name attribute. I have another dataframe with attributes tied to a vector ID, which is the same as the $name attribute of vectors represe