run_PCA: Principal Components Analysis
Description
Performs a principal components analysis on the Metabolite object.
Usage
run_PCA(
object,
nPCs = 10,
impute_method = "half-min",
log = TRUE,
scale = TRUE,
addPC = TRUE
)
Arguments
nPCs
Number of principal components to be calculated. Default value 10.
impute_method
Imputation method, the default method is half the minimum value (`half-min`) of the metabolite. Currently support 'half-min', "median", "mean", "zero". `NULL` without imputation.
log
Performs natural logarithm transformation before PCA analysis.
scale
scale feature in the PCA calculation.
addPC
If TRUE, merge PCs with `@sampleData` and return the `object`, else return `PC`.
Value
A list of PCs and variances explained.
Examples
Run this code# NOT RUN {
data(df_plasma)
d <- run_PCA(df_plasma)
# }
Run the code above in your browser using DataLab