as.ecdf,HistDat-method {HistDat} | R Documentation |
Converts this histogram to an instance of the "ecdf" class, allowing the calculation of cumulative densities, and quantiles
Description
Converts this histogram to an instance of the "ecdf" class, allowing the calculation of cumulative densities, and quantiles
Usage
## S4 method for signature 'HistDat'
as.ecdf(x)
Arguments
x |
An instance of the class HistDat |
Value
An instance of the ecdf
class. It can be invoked as a function to
return the cumulative proportion of the count data less than or equal to
x
.
Examples
hd <- HistDat(vals = 1:3, counts = c(1, 2, 1))
cdf <- as.ecdf(hd)
cdf(2) # returns 0.75
[Package HistDat version 0.2.0 Index]