Neighbourhood matrix

ids <- lapply(dists, function(x) {1 / x})
head(ids)
## [[1]]
## [1] 1.670235 1.725073
## 
## [[2]]
## [1] 1.670235 1.404736 2.943309
## 
## [[3]]
## [1] 1.725073 1.404736 1.782670 1.910694
## 
## [[4]]
## [1] 2.943309 1.782670 1.448959 3.160865
## 
## [[5]]
## [1] 1.910694 1.448959 1.327423 1.914198 1.396239 2.159562 1.799038 1.322661
## 
## [[6]]
## [1] 1.327423 1.841662