View source: R/pcaLoading2dPlot.R
pcaLoading2dPlot | R Documentation |
Produces loading plots from pcaBySvd
with the same graphical options as plotScatter
.
pcaLoading2dPlot( resPcaBySvd, axes = c(1, 2), title = "PCA loading plot", points_labs_rn = FALSE, metadata = NULL, ... )
resPcaBySvd |
A list corresponding to the output value of |
axes |
A numerical vector with the 2 Principal Components axes to be drawn. |
title |
Plot title. |
points_labs_rn |
Boolean indicating if the rownames of the loadings matrix should be plotted. |
metadata |
A nxk "free encoded" data.frame corresponding to |
... |
Additional arguments to be passed to |
pcaLoading2dPlot
is a wrapper of plotScatter
.
A ggplot
object with the PCA loading plot.
data('UCH') ResPCA = pcaBySvd(UCH$outcomes) # adding (arbitrary) color and shape to points groups <- rep(c(1,2), length.out = ncol(UCH$outcomes)) metadata <- data.frame(groups) pcaLoading2dPlot(resPcaBySvd = ResPCA, axes = c(1,2), title = "PCA loading plot UCH", metadata = metadata, color = "groups", shape = "groups")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.