adjustSpatialWeights: Semantic adjusted spatial weights

Description Usage Arguments Value Examples

View source: R/side_functions.R

Description

Function to adjust the spatial weights so that they represent semantic distances between neighbours

Usage

1
adjustSpatialWeights(data, listw, style)

Arguments

data

A dataframe with numeric columns

listw

A nb object from spdep

style

A letter indicating the weighting scheme (see spdep doc)

Value

A listw object (spdep like)

Examples

1
2
3
4
5
6
7
data(LyonIris)
AnalysisFields <-c("Lden","NO2","PM25","VegHautPrt","Pct0_14","Pct_65","Pct_Img",
"TxChom1564","Pct_brevet","NivVieMed")
dataset <- LyonIris@data[AnalysisFields]
queen <- spdep::poly2nb(LyonIris,queen=TRUE)
Wqueen <- spdep::nb2listw(queen,style="W")
Wqueen2 <- adjustSpatialWeights(dataset,queen,style="C")

geocmeans documentation built on April 21, 2021, 9:07 a.m.