do_pca: Performs a Principal Components Analysis

Description Usage Arguments Value Examples

View source: R/stats.R

Description

Performs a Principal Components Analysis

Usage

1
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

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

hipathia documentation built on Nov. 8, 2020, 7:52 p.m.