Given a kernel estimate of a probability density, compute the corresponding cumulative distribution function.
CDF(f, ...) ## S3 method for class 'density' CDF(f, ..., warn = TRUE)
Density estimate (object of class
Logical value indicating whether to issue a warning if the
CDF is generic, with a method for class
This calculates the cumulative distribution function
whose probability density has been estimated and stored in the object
f. The object
f must belong to the class
and would typically have been obtained from a call to the function
A function, which can be applied to any numeric value or vector of values.
b <- density(runif(10)) f <- CDF(b) f(0.5) plot(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.