Description Usage Arguments Details Value Author(s) References
This function uses the pca function implemented in the mixOmics package for PCA analysis
1 2 3 4 5 | get_pca(X, samplelabels, legendlocation = "topright", filename = NA,
ncomp = 5, center = TRUE, scale = TRUE, legendcex = 0.5,
outloc = getwd(), col_vec = NA, sample.col.opt = "default",
alphacol = 0.3, class_levels = NA, pca.cex.val = 3,
pca.ellipse = TRUE, ellipse.conf.level = 0.5, samplenames = FALSE)
|
X |
Data matrix without m/z and time. |
samplelabels |
Vector with class label for each sample. |
legendlocation |
Location of the legend on PCA score plots |
filename |
eg: "all", "signficantfeats" |
ncomp |
Number of components; please use ?pca for more information |
center |
Should the data be centered?; please use ?pca for more information |
scale |
Should the data be scaled?; please use ?pca for more information |
legendcex |
Size of the legend text in the PCA score plots. e.g.: 0.5 or 0.7 |
outloc |
Output folder location |
col_vec |
Provide vector of colors for each group. eg: NA or c("red","green") for cases and controls, respectively. This argument is ignored if sample.col.opt is provided |
sample.col.opt |
Select R color palette. eg: "rainbow", "terrain", "topo". "heat", "default" |
alphacol |
Semi-transparent colors eg: 0.2 |
class_levels |
Vector with names of different sample groups. eg: c("case", "control") or NA |
pca.cex.val |
Size of dots in PCA score plots. eg: 0.4 |
pca.ellipse |
Should the score confidence interval for each group be drawn? eg: TRUE or FALSE |
ellipse.conf.level |
Confidence interval level eg: 0.95 |
samplenames |
Should the sample names be included in PCA plots? eg: TRUE or FALSE |
This function performs PCA analysis. The results are saved in a RDA file.
The function returns PCA results as an object and generates pairwise score plots for the first three components
Karan Uppal
mixOmics
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.