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
Describe the bug
I think that the function to_spatial_smooth() should return a more informative error message in case there is no pseudo-node with the correct degree.
It doesn't make any sense to "smooth" that network, but I think the function should simply return the original input, maybe with a warning message. Moreover, the error message is quite cryptic.
I think that the easiest solution is to add a check after the following code:
Interesting! I would even say there should be no error message at all. The smoother should just return the original network when there are no pseudo nodes.
Describe the bug
I think that the function
to_spatial_smooth()
should return a more informative error message in case there is no pseudo-node with the correct degree.Reproducible example
Created on 2021-01-29 by the reprex package (v0.3.0)
It doesn't make any sense to "smooth" that network, but I think the function should simply return the original input, maybe with a warning message. Moreover, the error message is quite cryptic.
I think that the easiest solution is to add a check after the following code:
sfnetworks/R/morphers.R
Lines 550 to 555 in dd4b919
to test if any node has the correct degree.
Expected behavior
A more informative warning/error message or return the input data.
R Session Info
Created on 2021-01-29 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: