ComparePcaPlots: Compare PCA Plots

Description Usage Arguments Author(s) Examples

View source: R/ComparePcaPlots.R

Description

Produces a comparison of principal component multiplots

Usage

1
2
3
4
ComparePcaPlots(lfeaturedata, lgroupdata, saveplot = FALSE, plotname = "",
  savetype = c("png", "bmp", "jpeg", "tiff", "pdf"), y.axis = 1,
  x.axis = 2, center = TRUE, scale = TRUE, lmain = NULL, n = 3,
  showlegend = TRUE, usercols = NULL, cex_val = 0.7, ...)

Arguments

lfeaturedata

A list of data frames 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.

lgroupdata

A list of data frames or a vectors with group names.

saveplot

A logical indication whether to save the plot 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 "png","bmp","jpeg","tiff","pdf" type files.

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.

lmain

A list of plot titles

n

The number of principal components to be plotted. The default value is set to 3.

showlegend

A logical indication whether to print a legend for the plot.

usercols

A character string with colours to be used or TRUE for ColList to be used (ColList is the defualt set of colours used in other plots in this package). A value other then NULL will automatically set showlegend to FALSE.

cex_val

A numeric indicating the size of some text elements.

...

Arguments to be passed on to other methods.

Author(s)

Alysha M De Livera, Gavriel Olshansky.

Examples

1
2
3
    data(mixdata)
#     ComparePcaPlots(list(mixdata$featuredata,mixdata$featuredata*1.2),
#             list(mixdata$sampledata[,3],mixdata$sampledata[,3])) 

NormalizeMets documentation built on May 1, 2019, 10:26 p.m.