queen_weights: Create a Queen contiguity weights

Description Usage Arguments Value Examples

View source: R/weights.R

Description

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

Usage

1
2
3
4
5
6
queen_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

w An object of Weight class

Examples

1
2
3
4
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- geoda_open(guerry_path)
queen_w <- queen_weights(guerry)
summary(queen_w)

lixun910/rgeoda documentation built on March 19, 2021, 3:49 p.m.