Description Usage Arguments Details Author(s) Examples
Function generates a principal component plot to best view convex hulls in low dimensions.
1 2 3 4 5 6 7 8 9 10 |
dat |
A matrix or data frame of data |
std |
A logical value that if TRUE finds standard deviates of the data (data are both centered and scaled by variable standard deviations). |
PC |
A vector of length 2 to indicate which PCs to view. The default is c(1, 2). This can be changed to view alternative dimensions. Illogical requests will defualt to c(1, 2) with a warning |
group |
A factor of vector coercible to factor. If null, the a single convex hull with be returned. |
group.cols |
A optional vector with length equal to the number of group levels to describe the colors of the hulls. If NULL, R standard colors will be used. |
group.lwd |
A optional vector with length equal to the number of group levels to describe the line weight (magnification) of the hulls. If NULL, group.lwd = 1 will be used. |
group.lty |
A optional vector with length equal to the number of group levels to describe the line type of the hulls. If NULL, group.lty = 1 (solid line) will be used. |
... |
other arguments for graphical parameters |
Principal components are obtained from eigen analysis of an among-group
covariance or correlation matrix. (Correlation matrix is used if std = TRUE.)
Typical plot parameters should be available but parameters for hulls are controlled
with specific function arguments. One can add points, lines, arrows, or a legend
to the plot canvas, among other plot tricks, if desired. (See points
,
lines
, arrows
, and legend
).
Michael Collyer
1 2 3 4 | library(RRPP)
data("Pupfish")
group <- interaction(Pupfish$Sex, Pupfish$Pop)
pc.hull.plot(Pupfish$coords, group = group)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.