You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not a major problem, but head and tail behave in a counter-intuitive manner, I think. I'd expect:
create_ring(10) %>% activate(nodes) %>% head
to return information on the first 10 nodes
create_ring(10) %>% activate(edges) %>% head
to return information on the first 10 edges, and finally
create_ring(10) %>% head
to maybe say that a graph doesn't have a head. tidygraph reverts to igraph's default in all cases. I thought I'd add a head.tbl_graph function myself, but noticed that a tbl_graph doesn't seem to have an unactivated state - it's nodes by default. Wouldn't it make sense to have such a state?
On an unrelated note (sorry), the initial table for nodes created by create_ * is empty - perhaps it'd make sense to initialise it with a single index column?
The text was updated successfully, but these errors were encountered:
Don't think there's much sense in an unactivated state - you're either working with nodes or edges...
As for head/tail, I've been very deliberate in not masking any functionality from graph, so that it is almost certain that a tbl_graph will behave as an graph object if passed into a function that expects an graph object... if you want to glimpse the top of either nodes or edges just do %>% as_tibble
Not a major problem, but head and tail behave in a counter-intuitive manner, I think. I'd expect:
to return information on the first 10 nodes
to return information on the first 10 edges, and finally
to maybe say that a graph doesn't have a head. tidygraph reverts to igraph's default in all cases. I thought I'd add a head.tbl_graph function myself, but noticed that a tbl_graph doesn't seem to have an unactivated state - it's nodes by default. Wouldn't it make sense to have such a state?
On an unrelated note (sorry), the initial table for nodes created by create_ * is empty - perhaps it'd make sense to initialise it with a single index column?
The text was updated successfully, but these errors were encountered: