# NOT RUN {
data(calibdata)
head(calibdata)
str(calibdata)
## The following example require to have downloaded
## a large elevation raster with the function getelev()
## and will therefore not run unless you type:
## example(calibdata, run.dontrun=TRUE)
# }
# NOT RUN {
if(require(raster)){
### DELETE AND RECREATE ELEVATION DATA
calibdata$elev <- NULL ## we delete them
## we reconstruct the elevation data using an elevation raster:
## (see ?getelev for details on how to get the tif file)
elevationrasterbig <- raster("gmted2010_30mn.tif")
calibdata$elev <- extract(
elevationrasterbig,
cbind(calibdata$long, calibdata$lat))
head(calibdata)
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab