Whereas the command quantile
calculates
the quantiles of a dataset corresponding to desired probabilities
\(p\), the command quantilefun
returns a function which can be used to compute any quantiles of the
dataset.
If f <- quantilefun(x)
then f
is a function such that
f(p)
is the quantile associated with any given probability p
.
For example f(0.5)
is the median of the original data, and
f(0.99)
is the 99th percentile of the original data.
If x
is a pixel image (object of class "im"
)
then the pixel values of x
will be extracted
and the quantile function of the pixel values is constructed.
If x
is an object representing a cumulative distribution
function (object of class "ecdf"
or "ewcdf"
) then the
quantile function of the original data is constructed.