# NOT RUN {
cell.ids = c(5, 84, 17, 23)
blocks = c(5, 4, 7)
# (1) Considering diagonal neighbours as well:
findLinearNeighbours(cell.ids = cell.ids, blocks = blocks, diag = TRUE)
# (2) Only consider neighbours which are parellel to the axes:
findLinearNeighbours(cell.ids = cell.ids, blocks = blocks)
# }
Run the code above in your browser using DataLab