plotPCA {MUVR2} | R Documentation |
PCA score plot
Description
Customised PCA score plots with the possibility to choose PCs, exporting to png and the possibility to add color or different plotting symbols according to variable.
Usage
plotPCA(pca, PC1 = 1, PC2 = 2, file, colVar, symbVar, main = "")
Arguments
pca |
A 'prcomp' object |
PC1 |
Principal component on x-axis |
PC2 |
Principal component on y-axis |
file |
If specified provides the name of a png export file. Otherwise normal plot. |
colVar |
Continuous variable for coloring observations (40 cuts) |
symbVar |
Categorical/discrete variable for multiple plot symbols |
main |
If provided provides a main title of the plot |
Value
A PCA score plot. Exported as png if 'file' specified in function call.
Examples
data("freelive2")
pca_object<-prcomp(XRVIP2)
plotPCA(pca_object)
[Package MUVR2 version 0.1.0 Index]