SharedBMat | R Documentation |
This function calculates the shared boundary matrix
SharedBMat(sf_pol, rn = FALSE)
sf_pol |
spatial polygons, spatial lines object or spatial data frame |
rn |
logical, default FALSE. If TRUE, the spatial weights matrix is row-normalized |
W |
spatial weights matrix (length of shared boundary between spatial units) |
Rozeta Simonovska
library("sf")
ger <- st_read(system.file("shape/GermanyNUTS3.shp",
package = "SDPDmod"))
bav <- ger[which(substr(ger$NUTS_CODE,1,3)=="DE2"),] ## Bavarian districts
W <- SharedBMat(bav)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.