neighbours: Neighbours

View source: R/RcppExports.R

neighboursR Documentation

Neighbours

Description

Neighbours

Usage

neighbours(i, j, n, x, direction)

Arguments

i

row index.

j

column index.

n

number of neighbours (4 or 8).

x

matrix with values.

direction

(integer) for which direction to calculate costs: 0 for all, 1 for left, 2 for down, 3 for right, 4 for up.

Value

Vector with values the neighours of x


emilio-berti/enerscape documentation built on Sept. 9, 2024, 9:43 p.m.