Spatial neighbours list

  • A neighbours list (nb class) is a kind of sparse matrix: a list that gives the indices of neighbours for each area in turn.
    • e.g. the first 6 elements give the neighbour indices of the first 6 geometries of the input layer:
[[1]]
[1] 2 3
[[2]]
[1] 1 3 4
[[3]]
[1] 1 2 4 5
[[4]]
[1] 2 3 5 8
[[5]]
[1]  3  4  6  8  9 11 15 16
[[6]]
[1] 5 9