spplot help, please
Hi Marvin, this code works fine just as it should work. Which "state map" you need? A basemap with terrain/roads/cities/borders? In this case there are several possibilities to do that. Have a look at these links, they may solve your problem: https://pakillo.github.io/R-GIS-tutorial/#gmap http://www.nickeubank.com/wp-content/uploads/2015/10/RGIS3_MakingMaps_part1_mappingVectorData.html (Section "4.2 Basemaps with spplot") HTH, ?kos Bede-Fazekas Hungarian Academy of Sciences 2017.10.21. 3:29 keltez?ssel, Marvin Sharma via R-sig-Geo ?rta:
Hi,
I wanted to plot the spplot of my model residuals. The plot works
fine, but the state map does not appear. Code is given below and the
data are attached. I would greatly appreciate any help in this.
Marvin
library(spgwr)
library(spdep)
library(maps)
library(maptools)
data<-read.csv("try.csv",header=TRUE)
coords=cbind(data$Longitude,data$Latitude)
g.adapt.gauss <- gwr.sel(y~x, data,coords,adapt=TRUE)
res.adpt <- gwr(y~x, data,coords, adapt=g.adapt.gauss)
brks <- c(-0.25, 0, 0.01, 0.025, 0.075)
cols <- grey(5:2/6)
res.adpt$SDF$ols.e <- residuals(lm(y~x, data))
spplot(res.adpt$SDF, c("ols.e","gwr.e"),main="Residuals")
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo