ecdfofhist: Empirical Cumulative Distribution Function From a Histogram.

Description Usage Arguments Details Author(s) See Also Examples

Description

Computes an approximate empirical cumulative distribution function of a data set given a binned histogram representation of that dataset.

Usage

1
HistToEcdf(h, method="constant", f=0, inverse=FALSE)

Arguments

h

A histogram object (created by hist) representing a pre-binned dataset on which we'd like to calculate an ECDF.

method

specifies the interpolation method to be used in call to approxfun(). Choices are "linear" or "constant".

f

if method="constant" a number between 0 and 1 inclusive, indicating a compromise between left- and right-continuous step functions. See ?approxfun

inverse

if TRUE return the inverse Ecdf.

Details

This function approximates the e.c.d.f. (empirical cumulative distribution function) of a data set given a binned histogram representation of that data set.

Author(s)

Murray Stokely mstokely@google.com

See Also

histogramtools-package, ecdf, approxfun, and hist.

Examples

1
2
h <- hist(runif(100), plot=FALSE)
plot(HistToEcdf(h))

Example output



HistogramTools documentation built on May 2, 2019, 1:08 p.m.