adjacency_matrix | R Documentation |
A convenience function to convert output from sf::st_touches
to a sparse matrix as defined in the Matrix
package.
adjacency_matrix(dom)
dom |
An |
Returns a matrix A
whose (i,j)th entry contains a 1 if
areal units dom[i,]
and dom[j,]
are adjacent;
0 otherwise.
An adjacency matrix
data("acs_sf")
dom = acs5_2013[1:4,]
A = adjacency_matrix(dom)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.