Description Arguments Details Value Author(s) See Also
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,
...)
x |
object of class |
which |
type of probes to be used, for details see |
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 |
screeplot |
logical, if TRUE plot a |
squarepca |
logical, if TRUE make the y-axis of the PCA plot comparable to the x-axis. |
pcs |
a character |
add.labels |
logical, if TRUE then name labels will be added to the points. |
add.legend |
logical, if TRUE and |
col |
vector of colors for plot, length is number of samples. |
names |
optional vector of sample names. |
as.list |
logical, if TRUE then a |
... |
optional arguments to be passed to |
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.
None by default.
Optionally, for as.list=TRUE
a list
will be returned with the components sdev
and rotation
, see [stats]prcomp
.
Christian Stratowa, partly adapted from function plotPCA() of package affycoretools
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.