Description Usage Arguments Author(s) See Also Examples
Produces PCA plots of the metabolomics data.
1 2 3 4 5 6 7 | PcaPlots(featuredata, groupdata, saveplot = FALSE,
saveinteractiveplot = FALSE, plotname = "", savetype = c("png", "bmp",
"jpeg", "tiff", "pdf"), interactiveonly = FALSE, interactiveplots = TRUE,
y.axis = 1, x.axis = 2, center = TRUE, scale = TRUE,
userinput = TRUE, returninteractive = FALSE, main = NULL,
varplot = FALSE, multiplot = FALSE, n = 3, cols = NULL,
cex_val = 0.7, ...)
|
featuredata |
featuredata A data frame in the featuredata format. This is a dataframe with metabolites in columns and samples in rows. Unique sample names should be provided as row names. See NormalizeMets Vignette for details. |
groupdata |
A data frame or a vector with group names. |
saveplot |
A logical indication whether to save the plot produced. |
saveinteractiveplot |
A logical indication whether to save the interactive plots produced. |
plotname |
Name of the output file if the file is to be saved. This is the general name for all the graphs and the specific type prefix will be added automatically. |
savetype |
The required format for the plot to be saved in. Threre is a
choice of |
interactiveonly |
Alogical indicating whether to show interactive plots only. |
interactiveplots |
A logical indication whether an interactive plot is to be shown. |
y.axis |
The principal component to be plotted on the y-axis. |
x.axis |
The principal component to be plotted on the x-axis. |
center |
A logical indicating whether the variables should be scaled to have zero mean. |
scale |
A logical indicating whether the variables should be scaled to have unit variance before the analysis takes place. |
userinput |
A logical indication whether user input should be required to
show plots progressively. Should be |
returninteractive |
A logical indication whether a list of the interactive plots should be returned by the function |
main |
Plot title. |
varplot |
A logical indicating whether explained variance should be plotted. |
multiplot |
If |
n |
The number of principal components to be plotted if
|
cols |
A character string with colours to be used. |
cex_val |
A numeric indicating the size of some text elements. |
... |
Arguments to be passed on to other methods. |
Alysha M De Livera, Gavriel Olshansky
1 2 3 4 5 6 7 8 9 10 11 | data(mixdata)
# produce all results
PcaPlots(mixdata$featuredata,mixdata$sampledata[,3],multiplot = TRUE,
varplot = TRUE, interactiveplots = TRUE)
# return a list of the ineractive plots only
interactive.pca <- PcaPlots(mixdata$featuredata,mixdata$sampledata[,3],
interativeonly = TRUE, interactiveplots = TRUE,
userinput = FALSE, returninteractive = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.