neighbours: Returns an array that represents values of neighbours in the...

Description Usage Arguments Value

View source: R/neighbours.R

Description

Returns an array that represents values of neighbours in the clock-wise order starting from top-left neighbour

Usage

1
neighbours(m, self = FALSE)

Arguments

m

a matrix or array to compute the neighbours from

self

whether to add the 7-th direction, which is a copy of m

Value

If m is a matrix, the returned value is an array with third dimension representing the neighbour direction (1 to 6, or 7 if self is TRUE). If m is a 3D array, then then the result is a 4D array with the fourth dimension representing the direction.


beerda/hexmatrix documentation built on May 2, 2021, 4:15 a.m.