plotPCA {affycoretools}R Documentation

A Function to Make a PCA Plot from an ExpressionSet

Description

This function makes a PCA plot from an ExpressionSet, exprSet or matrix

Usage

plotPCA(eset, groups = NULL, groupnames = NULL, addtext = NULL, x.coord = NULL,
y.coord = NULL, screeplot = FALSE, squarepca = FALSE, pch = NULL, col =
NULL, pcs = c(1,2), legend = TRUE, ...)

Arguments

eset An ExpressionSet, exprSet or matrix
groups A numeric vector delineating group membership for samples. Default is NULL, in which case default plotting symbols and colors will be used.
groupnames A character vector describing the different groups. Default is NULL, in which case the sample names will be used.
addtext A character vector of additional text to be placed just above the plotting symbol for each sample. This is helpful if there are a lot of samples for identifying e.g., outliers.
x.coord Pass an x-coordinate if automatic legend placement fails
y.coord Pass a y-coordinate if automatic legend placement fails
screeplot Boolean: Plot a screeplot instead of a PCA plot? Defaults to FALSE
squarepca Should the y-axis of the PCA plot be made comparable to the x-axis? This may aid in interpretation of the PCA plot. Defaults to FALSE
pch A numeric vector indicating what plotting symbols to use. Default is NULL, in which case default plotting symbols will be used. Note that this argument will override the 'groups' argument.
col A numeric or character vector indicating what color(s) to use for the plotting symbols. Default is NULL in which case default colors will be used. Note that this argument will override the 'groups' argument.
pcs A character vector of length two indicating which principal components to plot. Defaults to the first two principal components.
legend Boolean. Should a legend be added to the plot? Defaults to TRUE
... Further arguments to be passed to plot. See the help page for plot for further information.

Value

This function returns nothing. It is called only for the side effect of producing a PCA plot or screeplot.

Author(s)

James W. MacDonald <jmacdon@med.umich.edu>


[Package affycoretools version 1.8.1 Index]