prot.pca: PCA Analysis

prot.pcaR Documentation

PCA Analysis

Description

This function performs principal component analysis (PCA) on a given matrix.

Usage

prot.pca(
  mat,
  metadata = NULL,
  center = TRUE,
  scale = FALSE,
  rank = NULL,
  removeVar = NULL,
  transposed = FALSE,
  BSPARAM = BiocSingular::ExactParam(),
  in_workflow = FALSE
)

Arguments

mat

A numeric matrix.

metadata

An optional data frame with rownames matching 'colnames(mat)'.

center

A logical indicating whether to center the data before PCA.

scale

A logical indicating whether to scale the data before PCA.

rank

An integer indicating the number of principal components to calculate.

removeVar

A numeric value between 0 and 1 indicating the fraction of variables to remove based on variance.

transposed

A logical indicating whether the matrix is transposed.

BSPARAM

An object of class ExactParam or ApproxParam.

in_workflow

Indicated whether this function is called from within prot.workflow.

Value

A list with components rotated, loadings, variance, sdev, metadata, xvars, yvars, and components.

References

BiocSingular (https://bioconductor.org/packages/release/bioc/html/BiocSingular.html)

Examples

mat <- matrix(rnorm(1000), nrow = 100, ncol = 10)
prot.pca(mat)


NicWir/VisomX documentation built on Dec. 8, 2024, 1:27 a.m.