标签:style blog http io ar color sp on 2014
> library(lattice)
> library(sp)
> data(meuse)
> coordinates(meuse) <- c("x","y")
> spplot(meuse, "zinc", do.log=T)
> bubble(meuse, "zinc", do.log=T, key.space="bottom")
> xyplot(log(meuse$zinc)~sqrt(meuse$dist), meuse, main="", xlab="dist", ylab="Zn")
> meuse$fitted.s <- predict(zn.lm, meuse) - mean(predict(zn.lm,meuse)) > meuse$residuals <- residuals(zn.lm) > spplot(meuse, c("fitted.s", "residuals")) > spplot(meuse, c("fitted.s", "residuals"))
> library(gstat) > idw.out <- idw(zinc~1, meuse, meuse.grid, idp=1) [inverse distance weighted interpolation] > spplot(idw.out)
> spplot(idw.out, c("var1.pred"))
标签:style blog http io ar color sp on 2014
原文地址:http://www.cnblogs.com/takeaction/p/4122670.html