Neighbours list based on distance bounds

nb3 <- dnearneigh(x = centroids, d1 = 0, d2 = 0.4)
## Warning in dnearneigh(x = centroids, d1 = 0, d2 = 0.4): neighbour object has 18
## sub-graphs
head(nb3)
## [[1]]
## [1] 0
## 
## [[2]]
## [1] 4
## 
## [[3]]
## [1] 0
## 
## [[4]]
## [1] 2 8
## 
## [[5]]
## [1] 0
## 
## [[6]]
## [1] 0