pcaPlot: Principal component analysis plot

View source: R/groupComp.R

pcaPlotR Documentation

Principal component analysis plot

Description

Creates a scatter plot with the selected principal components

Usage

pcaPlot(
  pcdt,
  object,
  pc = c(1, 2),
  groupvar,
  interactive = TRUE,
  ellipse = TRUE,
  ellipse.type = "t",
  level = 0.95,
  bygroup = TRUE
)

Arguments

pcdt

The prcomp object to use for plotting

object

The ExpressionSet or SummarizedExperiment object used when creating the PCA

pc

A length two vector with the principal components to be plot in each axis (x, y).

groupvar

A numeric or string indicating the variable from the phenodata with the QC samples to apply the pre-processing functions that require QC.

interactive

Boolean indicating if a plotly will be output instead of a ggplot

ellipse

A boolean indicating if a ellipse should be drawn

ellipse.type

The type of ellipse drawn. See ?stat_ellipse for more information

level

The confidence level of the ellipse

bygroup

A boolean indicating if ellipses should be drawn for each group. (If there are enough points)

Value

A ggplot2 or plotly pca scatter plot

Author(s)

Jordi Rofes Herrera


jordirofes/OmniOmics documentation built on Nov. 22, 2022, 5:46 a.m.