Creating a neighbours list (‘nb’) from geometries

  • contiguity based:
    • poly2nb(<polygons>, queen = TRUE) (default)
    • poly2nb(<polygons>, queen = FALSE)
  • distance based:
    • dnearneigh(<points>, d1, d2)
    • knn2nb(<matrix of nearest neighbours>)