powered by
Score, VIP or loading plot for the plsda results
# S3 method for plsda plot( x, type = "score", group = NULL, ind = c(1, 2), color = NULL, top = 20, ellipse = TRUE, order = FALSE, pt.size = 3, label = TRUE, label.size = 4, repel = FALSE, rotation = FALSE, ... )
a ggplot2 object
an plsda object
score, vip or loading
color used for score plot
which components to be used for score plot or loading plot
color used for score or loading plot
the number of largest loading value to plot
TRUE/FALSE
order by the value or not
point size
plot label or not (TRUE/FALSE)
label size
use ggrepel to show the label or not
flip the figure or not (TRUE/FALSE)
For consistency
Kai Guo
X <- matrix(rnorm(500),10,50) Y <- rep(c("a","b"),each=5) fit0 <- plsda(X,Y,2) plot(fit0, type = "score", group = factor(Y))
Run the code above in your browser using DataLab