Learn R Programming

rgeoda (version 0.0.6)

rook_weights: Rook Contiguity Spatial Weights

Description

Create a Rook contiguity weights with options of "order", "include lower order" and "precision threshold"

Usage

rook_weights(
  geoda_obj,
  order = 1,
  include_lower_order = FALSE,
  precision_threshold = 0
)

Arguments

geoda_obj

An object of [geoda] class

order

(Optional) Order of contiguity

include_lower_order

(Optional) Whether or not the lower order neighbors should be included in the weights structure

precision_threshold

(Optional) The precision of the underlying shape file is insufficient to allow for an exact match of coordinates to determine which polygons are neighbors

Value

An instance of Weight-class

Examples

Run this code
# NOT RUN {
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- geoda_open(guerry_path)
rook_w <- rook_weights(guerry)
summary(rook_w)
# }

Run the code above in your browser using DataLab