I created an ecdf plot for my raster file using this code:
library(rgdal)
topo <- readGDAL("C:/WARMF_Upbroad/UpperBroad_Clip41.tif")
plot(ecdf(topo$band1), main="Hypsometric curve", xlab="Elevation (m)")
I want corresponding values of the elevation data for (0.1 to 0.99) quantiles from this plot. How to get them? I am a beginner in using R and was confused if I need to convert the raster data to vector data?
I tried converting the raster data to vector data in data.frame but it gives me this error:
Error in `[.data.frame`(x, order(x, na.last = na.last, decreasing = decreasing)) :
undefined columns selected
In addition: Warning message:
In xtfrm.data.frame(x) : cannot xtfrm data frames