plot_pca: Time function

View source: R/plot_pca.R

plot_pcaR Documentation

Time function

Description

plot_pca Plots a pca with a specific coloring scheme. Also specifies the variance of each principal component.

Usage

plot_pca(
  pca_out,
  comp1,
  comp2,
  sep = NULL,
  col_index = NULL,
  str_extract_regex = NULL,
  col_label = ""
)

Arguments

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

Value

A ggplot of a pca


amyh25/RFunctions documentation built on Aug. 26, 2023, 4:33 p.m.