I understand that one could create an igraph graph directly from dataframe(s). I have tried to do this, but somehow failed so far.
I have a DF "myvertices" with the following schema (id and name are unique):
id, name, feature_a, feature_b, feature_c
And another DF "myedges" with the following schema:
id, from, to, feature_d, feature_e, feature_f
where "from" and "to" contain "id"s from "myvertices".
Based on these, I have tried the following:
g <- graph.data.frame(myedges, directed=TRUE, vertices=myvertices)
but resulted the following:
Error in graph.data.frame(myedges, directed = T, vertices = myvertices) : Duplicate vertex names.