These functions can be used for geographic or projected coordinate reference systems and expect 2D data.
ww_build_weights(x, wt = NULL, include_self = FALSE, ...)
A listw
object.
Either an sf object or a "nb" neighbors list object.
If an sf object, will be converted into a neighbors list via
ww_build_neighbors()
.
Either a "listw" object (which will be returned unchanged),
a function for creating a "listw" object from x
, or NULL
, in which case
weights will be constructed via spdep::nb2listw()
.
Include each region itself in its own list of neighbors?
Arguments passed to the weight constructing function.