constructing spatial weight matrix based on geocomplexity with similar geographical configurations
Source:R/geoc_swm.R
geocs_swm.Rd
constructing spatial weight matrix based on geocomplexity with similar geographical configurations
Arguments
- sfj
An
sf
object or spatial vector object that can be converted tosf
bysf::st_as_sf()
.- wt
(optional) Spatial weight matrix based on spatial adjacency or spatial distance relationships.
- style
(optional) A character that can be
B
,W
,C
. More to seespdep::nb2mat()
. Default isB
.- ...
(optional) Other parameters passed to
geocomplexity::geocs_vector()
.
Examples
econineq = sf::read_sf(system.file('extdata/econineq.gpkg',package = 'geocomplexity'))
wt_gc = geocs_swm(econineq)
wt_gc[1:5,1:5]
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 0.6926861 0.7649766 0.7744006 0.6888728 0.7255376
#> [2,] 0.6926861 0.7649766 0.7744006 0.6888728 0.7255376
#> [3,] 0.6926861 0.7649766 0.7744006 0.6888728 0.7255376
#> [4,] 0.6926861 0.7649766 0.7744006 0.6888728 0.7255376
#> [5,] 0.6926861 0.7649766 0.7744006 0.6888728 0.7255376