Spatial Interpolation -- Notes, Overheads and R Code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The file spatial-notes.pdf (8 pages) are an introduction to the spatial abilities available in R packages. Other files relate to a talk given (April 15) at the course described at: http://www.geostat-course.org/GeoSciences_AU_2011 interp-ohp.pdf: Discusses and demonstrates the use of Generalized Additive models to fit smooth curves and surfaces, on their own or in conjunction with kriging, for spatial interpolation. spatial-notes.pdf: Brief notes on spatial interpolation using R. [added May 31, 2011] The file meusesp.Rdata in this directory holds the object meusesp of class "SpatialPointsDataFrame". An object that has all the same columns except ahn can be created thus: library(gstat) # sp is a dependency, and will also be attached data(meuse) meusesp <- meuse meusesp$Soil <- meuse$soil levels(meusesp$Soil) <- c("1","2","1") proj4string(meusesp) <- CRS("+init=epsg:28992") coordinates(meusesp) <- ~x+y The easiest way to see how the functions cv.gamkrige() and compare.gamkrige() work is to run them, using default arguments: 1) Create meusesp as above, or load or attach meusesp.RData from this directory into your workspace. 2) Type cv.gamkrige() 3) Type compare.gamkrige() [this calls cv.gamkrige()] Now experiment, if you are so inclined, with models that are alternative to the defaults used in the calls to the functions cv.gamkrige() and compare.gamkrige(). The file slidefuns.R has code for the functions used to create the graphs in the overheads spatial.pdf NB: Attaching or loading meusesp.RData from this directory will give an object that has the columns Soil and ahn (this is height above sea level, where elev is height above river bed). John Maindonald April 10 2011.