Description Usage Arguments Examples
Shows a 2D PCA scores plot of two principal componets.
1 2 3 |
dataset |
list representing the dataset from a metabolomics experiment. |
pca.result |
prcomp object with the PCA results. |
column.class |
metadata's variable. |
pcas |
vector of two elements with the PCs that will be plotted. |
labels |
boolean value indicating if the sample's labels will be displayed. |
ellipses |
boolean value that indicates if an ellipse will be drawn on each group of the metadata's variable. Ellipses will not be drawn if bw=TRUE. |
bw |
if TRUE, it will be displayed a black and white plot. It defaults to FALSE. |
pallette |
parameter of scale_colour_brewer from ggplot2. |
leg.pos |
position of the legend. |
xlim |
vector with two numeric values indicating the limits of the x axis. |
ylim |
vector with two numeric values indicating the limits of the y axis. |
1 2 3 4 5 6 | ## Example of a 2D PCA scores plot
library(specmine.datasets)
data(cachexia)
pca.result = pca_analysis_dataset(cachexia)
pca_scoresplot2D(cachexia, pca.result, "Muscle.loss", pcas = c(1,2),
ellipses = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.