Learn R Programming

lgcp (version 1.3-3)

neigh2D: neigh2D function

Description

A function to compute the neighbours of a cell on a toral grid

Usage

neigh2D(i, j, ns, M, N)

Arguments

i
cell index i
j
cell index j
ns
number of neighbours either side
M
size of grid in x direction
N
size of grid in y direction

Value

  • the cell indices of the neighbours