cdf | R Documentation |
Generates and plots a cumulative distribution function.
cdf(x, ...)
## Default S3 method:
cdf(x, y, discrete = TRUE, ...)
## S3 method for class 'cdf'
plot(x, y, ..., col.01line = "black", pch = 19)
x |
numeric: x-values |
... |
further parameters given to |
y |
numeric: y-values |
discrete |
logical: if distribution is discrete |
col.01line |
color: color of horizontal lines at 0 and 1 (default: |
pch |
point type: See |
returns a cdf
object
# Binomial distribution
x <- cdf(0:10, pbinom(0:10, 10, 0.5))
plot(x)
# Exponential distribution
x <- seq(0, 5, by=0.01)
x <- cdf(x, pexp(x), discrete=FALSE)
plot(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.