adeverse / adespatial

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

Forthcoming spdep breaks l. 187 in tutorial.Rmd #18

Closed rsbivand closed 3 years ago

rsbivand commented 3 years ago

Some time ago, soi.graph() stopped using compiled code because of questions with regard to whether that code was free or not. It then used rgeos and RANN. RANN is being dropped as Suggests: in this release of spdep, and dbscan is replacing it. RANN did fast k-nearest neighbours, but its porting of ANN did not permit its use for distance threshold neighbours, while dbscan ports ANN in a slightly better way and can search for distance neighbours. This means that your l. 187 should have checked that RANN was available, and must now check that dbscan is available - a simple conditioning through require("dbscan") is enough.

sdray commented 3 years ago

Thanks Roger. I removed the code from the tutorial to avoid a dependency for a singe line of an example