plot.plsda {o2plsda} | R Documentation |
Score, VIP or loading plot for the plsda results
Description
Score, VIP or loading plot for the plsda results
Usage
## S3 method for class '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,
...
)
Arguments
x |
an plsda object |
type |
score, vip or loading |
group |
color used for score plot |
ind |
which components to be used for score plot or loading plot |
color |
color used for score or loading plot |
top |
the number of largest loading value to plot |
ellipse |
TRUE/FALSE |
order |
order by the value or not |
pt.size |
point size |
label |
plot label or not (TRUE/FALSE) |
label.size |
label size |
repel |
use ggrepel to show the label or not |
rotation |
flip the figure or not (TRUE/FALSE) |
... |
For consistency |
Value
a ggplot2 object
Author(s)
Kai Guo
Examples
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))
[Package o2plsda version 0.0.25 Index]