Description Usage Arguments Value Author(s) See Also Examples
Calculates points on a 2D data ellipse
1 |
x |
A numeric vector, or a two-column matrix, or a data.frame |
y |
A numeric vector |
radius |
Radius of the ellipse |
... |
Arguments passed to |
dell
returns an object of class ell
consisting of a
matrix whose rows are points on the ellipse and, thus, can be plotted with plot
or lines
.
Georges Monette
1 2 3 4 5 6 7 8 9 10 11 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function( x, y, radius = 1, ...) {
if ( (is.matrix(x) && (ncol(x) > 1))|| is.data.frame(x)) mat <- as.matrix(x[,1:2])
else if (is.list(x)) mat <- cbind(x$x, x$y)
else mat <- cbind( x,y)
ell( apply(mat,2,mean), var(mat), radius = radius, ...)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.