SharedBMat {SDPDmod} | R Documentation |
Shared boundary matrix
Description
This function calculates the shared boundary matrix
Usage
SharedBMat(sf_pol, rn = FALSE)
Arguments
sf_pol |
spatial polygons, spatial lines object or spatial data frame |
rn |
logical, default FALSE. If TRUE, the spatial weights matrix is row-normalized |
Value
W |
spatial weights matrix (length of shared boundary between spatial units) |
Author(s)
Rozeta Simonovska
Examples
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)
[Package SDPDmod version 0.0.5 Index]