For each cell ID in cells, returns the IDs of all
adjacent cells. Triangle grids are not supported.
Arguments
- dggs
A dggs object from
dgconstruct()- cells
Integer vector of cell sequence numbers (SEQNUM)
Examples
library(dggridR)
dgneighbors(dgconstruct(res=3), c(1, 2, 3))
#> seqnum neighbor
#> 1 1 34
#> 2 1 61
#> 3 1 88
#> 4 1 115
#> 5 1 7
#> 6 2 8
#> 7 2 5
#> 8 2 133
#> 9 2 136
#> 10 2 250
#> 11 3 9
#> 12 3 6
#> 13 3 124
#> 14 3 127
#> 15 3 133
#> 16 3 5