## image data: terrain elevation
Z <- bei.extra$elev
if(require(spatstat.explore)) {
FE <- spatialcdf(Z, normalise=TRUE)
} else {
FE <- ecdf(Z[])
}
QE <- quantilefun(FE)
QE(0.5) # median elevation
if(interactive()) plot(QE, xlim=c(0,1),
xlab="probability", ylab="quantile of elevation")
Run the code above in your browser using DataLab