constructing spatial weight matrix based on geocomplexity with spatial dependence
Source:R/geoc_swm.R
geocd_swm.Rd
constructing spatial weight matrix based on geocomplexity with spatial dependence
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::geocd_vector()
.
Examples
econineq = sf::read_sf(system.file('extdata/econineq.gpkg',package = 'geocomplexity'))
wt_gc = geocd_swm(econineq)
wt_gc[1:5,1:5]
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 0.0000000 0.5050696 0.4544196 0.5640641 0.5800917
#> [2,] 0.4990206 0.0000000 0.8393764 0.0000000 0.0000000
#> [3,] 0.4314267 0.8366975 0.0000000 0.0000000 0.0000000
#> [4,] 0.5440211 0.0000000 0.0000000 0.0000000 0.9429423
#> [5,] 0.5713514 0.0000000 0.0000000 0.9402259 0.0000000