ecdf2 | R Documentation |
Calculates the cumulative density of a set of numeric values.
ecdf2(x, y = NULL)
x |
A numeric vector of which the ECDF should be calculated |
y |
A numeric vector. See details for explanation |
This function extends the functionality of of the standard implementation of ECDF. Sometimes it is desireable to get the ECDF from pre-tabulated values. For this, elements in x and y have to be linked to each other.
A list
ecdf
for the standard implementation of ECDF
x <- rnorm(1000) e <- ecdf2(x) str(e) plot(e) plot(e$x, e$cs) x <- sample(1:100, 1000, replace=TRUE) plot(ecdf2(x)) tab <- table(x) x <- unique(x) lines(ecdf2(x, y=tab), col="green")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.