Closed agila5 closed 3 years ago
Thanks a lot @agila5 for moving this forward! I have been working a lot on other morphers locally so will rather include your code in my branch than merging the PR (which will probably have quite some conflicts to solve).
Some modifications I have in mind:
tidygraph::node_distance_from
or tidygraph::node_distance_to
.igraph::induced_subgraph
instead of tidygraph::filter
).To stay with the tidygraph morphing design, we should also return the result as a named argument in a list.
What do you think about these modifications. I can include them in my local branch that I merge soon.
Finally, about the name of the function: do you think to_spatial_neighborhood
is clear enough to be used? to_spatial_local_neighborhood
is quite a long name. But not sure if it is confusing in any way to use the shorter name.
Hi @luukvdmeer, and thanks for your comments.
What do you think about these modifications. I can include them in my local branch that I merge soon.
I agree with all suggestions and, if you want, I can work on the existing PR tomorrow in the afternoon/evening. Feel free to ignore the PR if you plan to merge your local branch sooner.
Finally, about the name of the function: do you think to_spatial_neighborhood is clear enough to be used?
Yes, I would use to_spatial_neighborhood
Examples:
Created on 2021-01-23 by the reprex package (v0.3.0)
If you agree with the implementation, I will add tests and update the vignette.