View source: R/SRPCAMS_methods.R
| biplot.msPCA | R Documentation |
Creates a biplot of the first two principal components from an msPCA object,
displaying variables or groups in the component space.
## S3 method for class 'msPCA'
biplot(x, ...)
x |
An object of class |
... |
Additional graphical parameters to customize the plot:
|
A ggplot2 object representing the biplot of the first two principal components.
set.seed(236)
data <- matrix(rnorm(2000), ncol = 4)
groups <- sample(1:10, 500, replace = TRUE)
W <- time_weights(N = 10, c(3,2,1))
covs <- ssMRCD(data, groups = groups, weights = W, lambda = 0.3)
pca <- msPCA(eta = 0.3, gamma = 0.5,COVS = covs$MRCDcov, k = 2)
pca$PC = align(PC = pca$PC, type = "largest")
biplot(pca, alpha = 1, shape = 16, size = 5, color = "variable")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.