Code optimized to find the potential neighbors within a radius using KD-trees (from the dbscan library, a new dependency), instead of calculating distances to all possible neighbors using sf (slow). Those distances can be used directly passing the argument exact_distances = FALSE.
Code optimized to find the potential neighbors within a radius using KD-trees (from the dbscan library, a new dependency), instead of calculating distances to all possible neighbors using sf (slow). Those distances can be used directly passing the argument exact_distances = FALSE.