-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create data frame column for tbl_graph class #160
Comments
This is sadly a limitation of igraph which is used as the internal data structure. I'm not sure they'd be willing to add this complexity to the code base. What say you @gaborcsardi? |
I am not sure I follow. |
This is |
I don't remember such limitation, I thought they could be generic R objects: library(igraph)
g <- make_star(10)
va <- replicate(10, mtcars, simplify = FALSE)
V(g)$foo <- va
g
|
They can be lists, but they can't be a data.frame with the rows in the data frame corresponding to the vertices/edges |
With an object of class
tbl_graph
it is not possible to create a data frame column. However, it is possible to do so with a normal data frame. This would be a welcomed addition to tidygraph functionality.Created on 2022-08-16 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: