add_pcs: Add PCA Loadings
Description
Add Principal Components Analysis Loadings to a tidy or triple omics
dataset.
Usage
add_pcs(
tomic,
value_var = NULL,
center_rows = TRUE,
npcs = NULL,
missing_val_method = "drop_samples",
label_percent_varex = TRUE,
verbose = TRUE
)
Value
A tomic
object with principal components added to samples.
Arguments
- tomic
Either a tidy_omic
or triple_omic
object
- value_var
An abundance value to use with hclust
- center_rows
center rows before performing PCA
- npcs
number of principal component loadings to add to samples
(default is number of samples)
- missing_val_method
Approach to remove missing values:
- drop_features
Drop features with missing values
- drop_samples
Drop samples which are missing all features,
then drop features
- impute
Impute missing values
label_percent_varex
If true then PCs will be labelled by the percent
of variability they explain.
verbose
extra reporting messages
Examples
Run this codeadd_pcs(brauer_2008_triple, npcs = 5)
Run the code above in your browser using DataLab