adeverse / adespatial

Multivariate Multiscale Spatial Analysis
http://adeverse.github.io/adespatial/
34 stars 7 forks source link

Update aem.weight.edges.R #9

Closed guiblanchet closed 5 years ago

guiblanchet commented 5 years ago

I just got a comment about an odd behaviour of the aem.weight.edges function; it sometimes generated negative weights. This is a behaviour that should not happen, weights should always be positive. The reason for this behaviour is that the maximum distance between two nearby site (max(links.length)) is larger than max.d. I added a trap in the code to send an error message when max(links.length) > max.d.