plot_pca | R Documentation |
plot_pca Plots a pca with a specific coloring scheme. Also specifies the variance of each principal component.
plot_pca(
pca_out,
comp1,
comp2,
sep = NULL,
col_index = NULL,
str_extract_regex = NULL,
col_label = ""
)
pca_out |
output of prcomp |
comp1 |
integer value for PC on x-axis |
comp2 |
integer value for PC on y-axis |
sep |
A string used for separating the sample name. Used with col_index |
col_index |
An index specifying a particular piece of the separated sample name string. Used with sep |
str_extract_regex |
A string specifying the regular expression to be extracted from the sample name for the color variable |
col_label |
The label of the color variable |
A ggplot of a pca
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.