# NOT RUN {
# Loading the DEM
require(rgdal)
data(EbroDEM1000m)
dem <- EbroDEM1000m
# Plotting the DEM
require(sp)
spplot(dem, scales=list(draw=TRUE, y=list(rot=90)))
# Computing and plotting the hypsometric curve
hypsometric(dem)
# If the raster file has more than 1 band, and the elevation data are in a
# band different from 1:
dem$ELEVATION <- EbroDEM1000m$band1 # dummy example
hypsometric(dem, band= 2)
hypsometric(dem, band= "ELEVATION") # same as before, but user-friendly
# }
Run the code above in your browser using DataLab