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
This currently doesn't seem to work, see reprex. It looks like only a small change will be required, but I might be wrong. Would you support multiple target nodes (default: all nodes) in to_shortest_path()?
library(tidygraph)
#> #> Attaching package: 'tidygraph'#> The following object is masked from 'package:stats':#> #> filter
play_geometry(10, 3) %>%
morph(to_shortest_path, from=1, to=2:10) %>%
crystallize() %>%
pull()
#> [[1]]#> # A tbl_graph: 2 nodes and 1 edges#> ##> # An undirected simple graph with 1 component#> ##> # Node Data: 2 x 3 (active)#> x y .tidygraph_node_index#> <dbl> <dbl> <int>#> 1 0.0952 0.307 1#> 2 0.146 0.651 2#> ##> # Edge Data: 1 x 3#> from to .tidygraph_edge_index#> <int> <int> <int>#> 1 1 2 1
Created on 2018-12-08 by the reprex package (v0.2.1.9000)
The text was updated successfully, but these errors were encountered:
I'll look into this. I don't think a to_distances() morphed makes sense as it does not change the graph structure (which is the purpose of morphers)... You should be able to get what you want using mutate(dist = node_distance_to(...)) or something like that
This currently doesn't seem to work, see reprex. It looks like only a small change will be required, but I might be wrong. Would you support multiple target nodes (default: all nodes) in
to_shortest_path()
?Created on 2018-12-08 by the reprex package (v0.2.1.9000)
The text was updated successfully, but these errors were encountered: