wrap | R Documentation |
wrap_hull()
computes convex hull of a set of observations.
wrap_confidence()
computes a confidence ellipse.
wrap_tolerance()
computes a tolerance ellipse.
wrap_hull(x, ...)
wrap_confidence(x, ...)
wrap_tolerance(x, ...)
## S4 method for signature 'MultivariateAnalysis'
wrap_confidence(x, margin = 1, axes = c(1, 2), group = NULL, level = 0.95)
## S4 method for signature 'MultivariateAnalysis'
wrap_tolerance(x, margin = 1, axes = c(1, 2), group = NULL, level = 0.95)
## S4 method for signature 'MultivariateAnalysis'
wrap_hull(x, margin = 1, axes = c(1, 2), group = NULL)
x |
An object from which to wrap observations (a |
... |
Currently not used. |
margin |
A length-one |
axes |
A length-two |
group |
A vector specifying the group an observation belongs to. |
level |
A |
wrap_*()
returns a data.frame
of envelope x
and y
coordinates.
An extra column named group
is added specifying the group an observation
belongs to.
N. Frerebeau
Other plot methods:
biplot()
,
plot()
,
screeplot()
,
viz_contributions()
,
viz_individuals()
,
viz_variables()
,
viz_wrap
## Load data
data("iris")
## Compute principal components analysis
X <- pca(iris, scale = TRUE, sup_quali = "Species")
## Confidence ellipse coordinates
conf <- wrap_confidence(X, margin = 1, group = "Species", level = c(0.68, 0.95))
## Tolerance ellipse coordinates
conf <- wrap_confidence(X, margin = 1, group = "Species", level = 0.95)
## Convex hull coordinates
hulls <- wrap_hull(X, margin = 1, group = "Species")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.