plot_pca: plot pca

View source: R/plot_pca.R

plot_pcaR Documentation

plot pca

Description

pca plot for a matrix

Usage

plot_pca(
  data,
  metadata = NULL,
  color_by = NULL,
  shape_by = NULL,
  center = TRUE,
  scale = FALSE,
  return_data = FALSE
)

Arguments

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

Value

list of ggplot2 object, or list of pca object


soulong/bioTools documentation built on Aug. 23, 2023, 1:35 a.m.