Description Usage Arguments Value
Returns an array that represents values of neighbours in the clock-wise order starting from top-left neighbour
1 | neighbours(m, self = FALSE)
|
m |
a matrix or array to compute the neighbours from |
self |
whether to add the 7-th direction, which is a copy of |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.