pca_score_plot | R Documentation |
pca_score_plot
pca_score_plot( object, pca_object, x = 1, y = 2, color_by, point_alpha = 1, point_size = 5, point_shape = 21, frame = TRUE, frame.type = "norm", ... )
object |
mass_dataset. |
pca_object |
pca_object from run_pca() |
x |
PC x for X axis, default is 1. |
y |
PC y for Y axis, default is 2. |
color_by |
which column (sample_info) is used to color samples |
point_alpha |
point_alpha default is 1. |
point_size |
point_size, default is 5. |
point_shape |
point_shape default is 21. |
frame |
?ggplot2::autoplot |
frame.type |
?ggplot2::autoplot |
... |
other paramters for ggplot2::autoplot |
ggplot2 plot.
Xiaotao Shen shenxt1990@163.com
library(massdataset) library(magrittr) library(dplyr) data("liver_aging_pos") liver_aging_pos pca_object = liver_aging_pos %>% scale() %>% run_pca() pca_score_plot(liver_aging_pos, pca_object, color_by = "group", loadings = TRUE) pca_score_plot(liver_aging_pos, pca_object, color_by = "group", frame = TRUE) + ggrepel::geom_text_repel(aes(label = sample_id)) pca_score_plot(liver_aging_pos, pca_object, x = 1, y = 3, color_by = "group", frame = TRUE) + ggrepel::geom_text_repel(aes(label = sample_id))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.