plot_pca | R Documentation |
pca plot for a matrix
plot_pca(
data,
metadata = NULL,
color_by = NULL,
shape_by = NULL,
center = TRUE,
scale = FALSE,
return_data = FALSE
)
data |
A data-matrix or data-frame containing numerical data only, variables are expected to be in the rows and samples in the columns by default |
metadata |
data-frame containing metadata, strictly enforced that rownames(metadata) == colnames(mat). DEFAULT: NULL |
color_by |
color point by, one of column in metadata |
shape_by |
shape point by, one of column in metadata |
center |
center the data before performing PCA, same as prcomp() 'center' parameter |
scale |
scale the data before performing PCA, same as prcomp() 'scale' parameter |
list of ggplot2 object, or list of pca object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.