PCA Plot for Device

Share:

Description

This function produces a PCA plot of the first two principle components for the selected device.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
plotPCA(x,
        which      = "UnitName",
        transfo    = log2,
        method     = "none",
        groups     = NULL,
        screeplot  = FALSE,
        squarepca  = FALSE,
        pcs        = c(1,2),
        add.labels = FALSE,
        add.legend = FALSE,
        col        = NULL,
        names      = "namepart",
        as.list    = FALSE,
        dev        = "screen",
        outfile    = "PCAPlot",
        w          = 540,
        h          = 540,
        ...) 

Arguments

x

object of class ExprTreeSet.

which

type of probes to be used, for details see validData.

transfo

a valid function to transform the data, usually “log2”, or “0”.

method

a character string indicating which correlation coefficient is to be computed. One of “pearson”, “spearman”, “kendall”, or “none”.

groups

character vector listing the group names in order of the names.

screeplot

logical, if TRUE plot a screeplot instead of a PCA plot.

squarepca

logical, if TRUE make the y-axis of the PCA plot comparable to the x-axis.

pcs

a character vector of length two indicating which principal components to plot.

add.labels

logical, if TRUE then name labels will be added to the points.

add.legend

logical, if TRUE and groups are supplied then a legend indicating the groups will be drawn. Optionally, a character indicating the position of the legend, default is “topleft”.

col

vector of colors for plot, length is number of samples.

names

optional vector of sample names.

as.list

logical, if TRUE then a list will be returned in addition to the plot.

dev

graphics device to plot to, i.e. one of “screen”, “jpeg”,“png”, “pdf” or “ps”.

outfile

the name of the output file.

w

the width of the device in pixels.

h

the height of the device in pixels.

...

optional arguments to be passed to plot.

Details

Function plotPCA produces a PCA plot of the first two principle components for slot data or the correlations between the columns of slot data, respectively, of an object of class ExprTreeSet.

For method="none" function [stats]prcomp will be applied to slot data directly, otherwise prcomp will be applied to (1 - cor(data)) with the respective method.

For screeplot=TRUE a screeplot will be plotted instead of a PCA plot.

For names=NULL full column names of slot data will be displayed while for names="namepart" column names will be displayed without name extension. If names is a vector of column names, only these columns will displayed as mvaplot.

Author(s)

Christian Stratowa

See Also

pcaplot

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.