as.ecdf-HistDat-method: Converts this histogram to an instance of the "ecdf" class,...

Description Usage Arguments Value Examples

Description

Converts this histogram to an instance of the "ecdf" class, allowing the calculation of cumulative densities, and quantiles

Usage

1
2
## 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

1
2
3
hd <- HistDat(vals = 1:3, counts = c(1, 2, 1))
cdf <- as.ecdf(hd)
cdf(2) # returns 0.75

HistDat documentation built on April 6, 2021, 9:08 a.m.