neighbours | R Documentation |
Neighbours
neighbours(i, j, n, x, direction)
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. |
Vector with values the neighours of x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.