[R-sig-Geo] use nbcosts() with geographic openstreetmap distance as weights
Germán Gallego
g@||egoveg@ @end|ng |rom y@hoo@com
Thu Aug 5 01:20:44 CEST 2021
I am conducting a study of Regionalization for the Ministry of Health of Colombia, using a MST and SKATER algorithm proposed by Assauncao. I have included 121 social and health covariates sumarized on a SImilarity matrix (After Explratory Factor analysis dimensiionality treatment). that will be used into skater function.
I am using a spatialpolygons dataframe with the 1081 municipalities that I've proccesed with nb2list() function. Also I have the geographic distance (extracted from openstreetmaps) from each capital city to anotherone, and I want to use it in nbcosts() function. When I read the nbcosts documentation I read that the data must be in dataframe class object but what i have is a dist object. The code does not show any error but im not sure how the dist object is computing it.
> ady <- poly2nb(colpeso.utmsub)
> adycostsdist <- nbcosts(ady,distkmat1)
> class(distkmat1)
[1] "dist"
I suppose that I have to covert a dist object into a nbdist object? or find the way to use it properly into nbcost function,
I'll apreciate your opinion on this.
Thank you in advance
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list