R/SpatialWeightOperators.R
CompareNeighbours.Rd
As spdep::diffnb.
spdep::diffnb
CompareNeighbours(W1, W2)
Spatial weights matrices of the same size.
List with difference (1-based indices per unit), only_first, only_second, identical.
difference
only_first
only_second
identical
CompareNeighbours(matrix(c(0, 1, 0, 1, 0, 1, 0, 1, 0), 3), 1 - diag(3))$difference #> [[1]] #> [1] 3 #> #> [[2]] #> integer(0) #> #> [[3]] #> [1] 1 #>