-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integration of ellipse function from mixtools.
- Loading branch information
Showing
2 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ Package: phonR | |
Type: Package | ||
Title: R tools for phoneticians and phonologists | ||
Version: 0.4-2 | ||
Date: 2013-03-06 | ||
Date: 2013-03-24 | ||
Author: Daniel R. McCloy | ||
Maintainer: Daniel R. McCloy <[email protected]> | ||
Depends: mixtools, R (>= 2.10) | ||
Depends: R (>= 2.10) | ||
Description: phonR is an R package for phoneticians and phonologists, including functions for normalization and plotting of vowels. | ||
License: GPL-3 | ||
URL: https://github.com/drammock/phonR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
\name{ellipse} | ||
\title{Draw Two-Dimensional Ellipse Based on Mean and Covariance} | ||
\alias{ellipse} | ||
\usage{ | ||
ellipse(mu, sigma, alpha = .05, npoints = 250, newplot = FALSE, | ||
draw = TRUE, ...) | ||
} | ||
|
||
\description{ | ||
Draw a two-dimensional ellipse that traces a bivariate normal density | ||
contour for a given mean vector, covariance matrix, and probability content. | ||
Note: this function was absorbed into phonR from the now-defunct package | ||
\dQuote{mixtools} by Derek Young, Tatiana Benaglia, Didier Chauveau, | ||
Ryan Elmore, Tom Hettmansperger, David Hunter, Hoben Thomas, and Fengjuan Xuan. | ||
} | ||
\arguments{ | ||
\item{mu}{A 2-vector giving the mean.} | ||
\item{sigma}{A 2x2 matrix giving the covariance matrix.} | ||
\item{alpha}{Probability to be excluded from the ellipse. The | ||
default value is alpha = .05, which results in a 95\% ellipse.} | ||
\item{npoints}{Number of points comprising the border of the ellipse.} | ||
\item{newplot}{If newplot = TRUE and draw = TRUE, plot the ellipse on a new | ||
plot. If newplot = FALSE and draw = TRUE, add the ellipse to an | ||
existing plot.} | ||
\item{draw}{If TRUE, draw the ellipse.} | ||
\item{...}{Graphical parameters passed to \code{lines} or \code{plot} | ||
command.} | ||
} | ||
\value{ | ||
\code{ellipse} returns an \code{npoints}x2 matrix of the points forming the | ||
border of the ellipse. | ||
} | ||
\references{ | ||
Johnson, R. A. and Wichern, D. W. (2002) \emph{Applied Multivariate Statistical Analysis, Fifth Edition}, | ||
Prentice Hall. | ||
} | ||
\examples{ | ||
## Produce a 95\% ellipse with the specified mean and covariance structure. | ||
|
||
mu <- c(1, 3) | ||
sigma <- matrix(c(1, .3, .3, 1.5), 2, 2) | ||
|
||
ellipse(mu, sigma, npoints = 200, newplot = TRUE) | ||
|
||
} | ||
|
||
\keyword{file} |