nb2Mat | R Documentation |
nb-class
from spdep to a sparse MatrixThis function genereates a sparse Matrix from a neighborhood matrix.
It bypasses spdep::nb2mat()
which leads to a dense matrix representation.
nb2Mat(nb)
nb |
A |
A sparse matrix
Lukas Dargel
nb <- spdep::poly2nb(germany_grid)
nb2Mat(nb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.