Displaying 1 result from an estimated 1 matches for "newattribute3".
Did you mean:
newattribute1
2012 Apr 23
1
Add attributes to igraph vector by name, not index
...m edges and 3m vectors. I can't do this by hand.
Perhaps the answer is something like,
by V(g)[]$name in g {
i=get.index(V(g)$name)
if (V(g)[1]$name == dataframe$ID) {
V(g)[1]$newattribute1 <- dataframe$attribute1
V(g)[1]$newattribute2 <- dataframe$attribute2
V(g)[1]$newattribute3 <- dataframe$attribute3
}
}
R,
CW Dillon
--
View this message in context: http://r.789695.n4.nabble.com/Add-attributes-to-igraph-vector-by-name-not-index-tp4580032p4580032.html
Sent from the R help mailing list archive at Nabble.com.