Closed trifle closed 7 months ago
So this was just a fluke from the edgelist which invalidated a join. Sorry for the noise!
The issue was that in order for vertex attributes to be set from an edgelist, they need to be character type, not dbl. This is documented in https://tidygraph.data-imaginist.com/reference/tbl_graph.html:
A data.frame containing information about the nodes in the graph. If edges$to and/or edges$from are characters then they will be matched to the column named according to node_key in nodes, if it exists. If not, they will be matched to the first column.
Because I had persisted my edgelist to csv and my node names
are numerical IDs, the columns were autocast to dbl.
Hi, thanks for the wonderful tidygraph package.
I recently ran some code that was about a year old, and it ran into errors because tidygraph current (
1.3.1
) changed the behavior ofas_tbl_graph()
to no longer read name attributes fromto
andfrom
columns of edgelists.What seemed weird to me is that
tbl_graph()
works completely differently, reading the edgelist as node attributes.If this is intentional then I'm sorry for the superfluous report, but the changelog read to me as if there were some fixes lately related to similar issues.