Skip to contents

get.neighbours allows to get a

Usage

get.neighbours(celltable, diagonal = FALSE)

Arguments

celltable

data frame with numbered cells as returned by the function create.grid.

diagonal

logical; if TRUE, diagonal neighbours are included. Default: FALSE.

Value

A matix with each cell and corresponding neighbouring cells.

Examples

grid <- create.grid()

neighbours <- get.neighbours(grid$celltable)