biplot | R Documentation |
Given the output of a PCA, makes biplot of data showing the magnitude of the factor loadings that contribute the plotted PCs.
biplot(pca, top.n, data, color, base_only)
pca |
The output of 'prcomp()' on the data to be ordinated. |
top.n |
The number of loadings to plot (ranked by descending magnitude). Default 5 |
data |
A 'data.frame' of sample metadata variables row names matching those in the PCA output. |
color |
The sample metadata variable (a column in provided 'data') by which to color plotted points. Taken as a string (i.e. 'subj') |
base_only |
Should only the base PCA be returned, without loadings? Default FALSE |
A ggplot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.