Description Usage Arguments Value Note Author(s) See Also Examples
Given a square binary adjacency matrix, the function
nbOrder
determines the integer matrix of neighbourhood orders
(shortest-path distance) using the function nblag
from the spdep package.
1 | nbOrder(neighbourhood, maxlag = 1)
|
neighbourhood |
a square, numeric or logical, and usually symmetric matrix with
finite entries (and usually zeros on the diagonal) which indicates
vertex adjacencies, i.e., first-order neighbourhood (interpreted as
|
maxlag |
positive scalar integer specifying an upper bound for the
neighbourhood order. The default (1) just returns the input
neighbourhood matrix (converted to binary integer mode).
|
An integer matrix of neighbourhood orders, i.e., the shortest-path
distance matrix of the vertices.
The dimnames
of the input neighbourhood
matrix are preserved.
By the end, the function issues a message
informing about the
range of maximum neighbourhood order by region.
Sebastian Meyer
nblag
from the spdep package, on which this
wrapper depends.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.