# NOT RUN {
head(CalibDataBat)
str(CalibDataBat)
## The following example require to have downloaded
## a large elevation raster with the function getelev()
## and will therefore not run unless you type:
## example(CalibDataBat, run.dontrun=TRUE)
# }
# NOT RUN {
if(require(raster)){
## We delete the elevation data
CalibDataBat$elev <- NULL
## 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")
CalibDataBat$elev <- extract(
elevationrasterbig,
cbind(CalibDataBat$long, CalibDataBat$lat))
head(CalibDataBat)
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab