R/weights.R
gda_rook_weights.Rd
Create a Rook contiguity weights with options of "order", "include lower order" and "precision threshold"
gda_rook_weights(
geoda_obj,
order = 1,
include_lower_order = FALSE,
precision_threshold = 0
)
An object of [geoda] class
(Optional) Order of contiguity
(Optional) Whether or not the lower order neighbors should be included in the weights structure
(Optional) The precision of the underlying shape file is insufficient to allow for an exact match of coordinates to determine which polygons are neighbors
An instance of Weight-class
if (FALSE) { # \dontrun{
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- geoda_open(guerry_path)
rook_w <- gda_rook_weights(guerry)
summary(rook_w)
} # }