plot_pca {spinifex} | R Documentation |
Plot 2 components of Principal Component Analysis
Description
Performs PCA on the data and used proto_default
to plot with percent
variation labels.
Usage
plot_pca(data, components = c(1, 2), ...)
Arguments
data |
Numeric matrix or data.frame of the observations. |
components |
The 2 numbers of the principal components to use. |
... |
Optionally pass arguments to |
See Also
Examples
dat <- scale_sd(wine[, 2:6])
plot_pca(data = dat)
## Different components, class coloring
clas <- as.factor(wine$Type)
plot_pca(data = dat, components = c(1, 3), position = "center",
aes_args = list(color = clas, shape = clas))
[Package spinifex version 0.3.8 Index]