do_pca: Performs a Principal Components Analysis

View source: R/stats.R

do_pcaR Documentation

Performs a Principal Components Analysis

Description

Performs a Principal Components Analysis

Usage

do_pca(data, sel_assay = 1, cor = FALSE)

Arguments

data

SummarizedExperiment or matrix of values to be analyzed. Samples must be represented in the columns.

sel_assay

Character or integer, indicating the assay to be normalized in the SummarizedExperiment. Default is 1.

cor

A logical value indicating whether the calculation should use the correlation matrix or the covariance matrix. (The correlation matrix can only be used if there are no constant variables.)

Value

do_pca returns a list with class princomp.

Examples

data(path_vals)
pca_model <- do_pca(path_vals[seq_len(ncol(path_vals)),])


martahidalgo/hipathia documentation built on Jan. 12, 2023, 1:44 p.m.