pcaplot-methods: PCA Plot

Description Arguments Details Value Author(s) See Also

Description

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

Usage

pcaplot(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, ...)

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.

...

optional arguments to be passed to plot.

Details

Function pcaplot 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.

Value

None by default.

Optionally, for as.list=TRUE a list will be returned with the components sdev and rotation, see [stats]prcomp.

Author(s)

Christian Stratowa, partly adapted from function plotPCA() of package affycoretools

See Also

plotPCA, corplot madplot


xps documentation built on Nov. 8, 2020, 6 p.m.