Open krlmlr opened 5 years ago
Also, can we get a to_distances()
morpher that adds the distance as a node attribute?
All of this presumes that from
is restricted to a single node.
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)