pcaPlot {Harman} | R Documentation |
Generates a Principle Component plot for an instance of
harmanresults
.
pcaPlot(harmanresults, pc_x = 1, pc_y = 2, this = "corrected", colBy = "batch", pchBy = "expt", palette = "rainbow", legend = TRUE, col, pch, ...)
harmanresults |
An instance of |
pc_x |
integer, principle component for the plot x dimension. |
pc_y |
integer, principle component for the plot y dimension. |
this |
string, legal values are |
colBy |
string, colour the points by the experimental or batch
variable; legal values
are |
pchBy |
string, point-type by the experimental or batch variable;
legal values are |
palette |
string, the function to call to create a vector of
contiguous colours with the levels of factor in |
legend |
logical, whether to display a legend on the plot. |
col, |
colour vector for the points. This parameter overrides
|
pch, |
integer vector giving the point type. This parameter
overrides |
... |
further arguments passed to or from other methods. |
If a vector of colours is supplied via the col
argument,
then a legend will not be drawn.
None
harmanresults
plot.harmanresults
library(HarmanData) data(OLF) expt <- olf.info$Treatment batch <- olf.info$Batch olf.harman <- harman(as.matrix(olf.data), expt, batch) pcaPlot(olf.harman) pcaPlot(olf.harman, colBy='expt') pcaPlot(olf.harman, pc_x=2, pc_y=3, this='original', pch=17)