plotPCA | R Documentation |
Plot Principle Component Analysis results.
plotPCA(
analysis,
cls = "class",
label = NULL,
scale = TRUE,
center = TRUE,
xAxis = "PC1",
yAxis = "PC2",
shape = FALSE,
ellipses = TRUE,
title = "PCA",
legendPosition = "bottom",
labelSize = 2,
...
)
## S4 method for signature 'AnalysisData'
plotPCA(
analysis,
cls = "class",
label = NULL,
scale = TRUE,
center = TRUE,
xAxis = "PC1",
yAxis = "PC2",
shape = FALSE,
ellipses = TRUE,
title = "Principle Component Analysis (PCA)",
legendPosition = "bottom",
labelSize = 2
)
## S4 method for signature 'Analysis'
plotPCA(
analysis,
cls = "class",
label = NULL,
scale = TRUE,
center = TRUE,
xAxis = "PC1",
yAxis = "PC2",
shape = FALSE,
ellipses = TRUE,
title = "PCA",
legendPosition = "bottom",
labelSize = 2,
type = c("pre-treated", "raw")
)
analysis |
object of class |
cls |
name of class information column to use for sample labelling |
label |
name of class information column to use for sample labels. Set to NULL for no labels. |
scale |
scale the data |
center |
center the data |
xAxis |
principle component to plot on the x-axis |
yAxis |
principle component to plot on the y-axis |
shape |
TRUE/FALSE use shape aesthetic for plot points. Defaults to TRUE when the number of classes is greater than 12 |
ellipses |
TRUE/FALSE, plot multivariate normal distribution 95\ confidence ellipses for each class |
title |
plot title |
legendPosition |
legend position to pass to legend.position argument
of |
labelSize |
label size. Ignored if |
... |
arguments to pass to the appropriate method |
type |
|
library(metaboData)
d <- analysisData(abr1$neg,abr1$fact) %>%
occupancyMaximum(cls = 'day')
## PCA plot
plotPCA(d,cls = 'day')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.