do_pca {hipathia} | R 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)),])

[Package hipathia version 2.10.0 Index]