Closed luukvdmeer closed 4 years ago
This is implemented in the new version, along with other edge measures
Suggestion: adding a parameter for self loop edges, in order to return NA instead of inf
Out of interest: when are you running into problems with Inf
values?
When I try to calculate mean neighborhood circuitry
On Fri, Jan 8, 2021, 21:06 Lucas van der Meer notifications@github.com wrote:
Out of interest: when are you running into problems with Inf values?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/luukvdmeer/sfnetworks/issues/51#issuecomment-756941204, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC5Q36Q4Z3L454CJRB7D4KDSY5JTRANCNFSM4NXCWJIQ .
Makes sense. I added the Inf_as_NaN
value to return NaN
instead of Inf
. NaN
is also returned when for some reason the edge length is 0. Then mean calculations (and others) can be run with na.rm = TRUE
. I think it makes sense to even use the default of Inf_as_NaN = TRUE
.
Is your feature request related to a problem? Please describe. There are graph measures so specific to spatial networks, that neither
sf
, neithertidygraph
has functions to calculate them. One such measure is the circuity of an edge, as described in this paper:Describe the solution you'd like An edge measurement function, in the same style as tidygraphs "edge measures" group of functions, that calculates the circuity of a spatially explicit edge:
edge_circuity
.