extract_loadings: extract loadings

View source: R/utility_functions.R

extract_loadingsR Documentation

extract loadings

Description

This is a wrapper function for stand_loadings() with added functionalities such as error breakers that is used by most functions in the package.

Usage

extract_loadings(pca, pca_data)

Arguments

pca

Object of class prcomp, princals or data.frame. If the object is a prcomp or princals object, pca_data is required, and the loadings will be extracted. If the object is a data.frame object, the dataframe needs to be formatted as: first column named Variables and all other columns corresponding to a PC. One row per variable. The values are the loadings.

pca_data

Data passed to the prcomp or princals function.

Value

A data.frame with the standardized loadings in the form of variables as rows and components as columns.

Author(s)

Abel Torres Espin


ucsf-ferguson-lab/syndRomics documentation built on June 26, 2022, 5:36 p.m.