Description Usage Arguments Value See Also Examples
Plots vectors with 0 < norms < 1 inside a circle. These plots are mainly designed to represent variables in principal components space for PCAs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | vectorplot(x, ...)
## Default S3 method:
vectorplot(x, y, col = par("col"), circle.col = "gray",
ar.length = 0.1, pos = NULL, cex = par("cex"), labels = NULL, ...)
## S3 method for class 'loadings'
vectorplot(x, choices = 1L:2L, col = par("col"),
circle.col = "gray", ar.length = 0.1, pos = NULL, cex = par("cex"),
labels = rownames(x), main = deparse(substitute(x)), ...)
## S3 method for class 'Correlation'
vectorplot(x, choices = 1L:2L, col = par("col"),
circle.col = "gray", ar.length = 0.1, pos = NULL, cex = par("cex"),
labels = rownames(x), main = deparse(substitute(x)), ...)
|
x |
An object that has a |
... |
Further arguments passed to plot functions. |
y |
A numeric vector with 0 < values < 1 of same length as 'x. |
col |
Color of the arrows and labels. |
circle.col |
The color for the circle around the vector plot. |
ar.length |
The length of the arrows. |
pos |
The position of text relative to arrows. If |
cex |
The factor of expansion for labels in the graph. |
labels |
The labels to draw near the arrows. |
choices |
A vector of two integers indicating the axes to plot. |
main |
The title of the plot. |
The object 'x' is returned invisibly. These functions are called for their side-effect of drawing a vector plot.
pcomp()
, loadings()
, Correlation()
1 2 3 4 5 6 | # Create a PCA and plot loadings and correlations
iris.pca <- pcomp(iris[, -5])
vectorplot(loadings(iris.pca))
vectorplot(Correlation(iris.pca))
# Note: on screen devices, change aspect ratio of the graph by resizing
# the window to reveal cropped labels...
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.