View source: R/dimensionality_reduction.R
run_PCA | R Documentation |
Performs a principal components analysis on the Metabolite object.
run_PCA(
object,
nPCs = 10,
impute_method = "half-min",
log = TRUE,
scale = TRUE,
addPC = TRUE
)
object |
A Metabolite object. |
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'. |
A list of PCs and variances explained.
data(df_plasma)
d <- run_PCA(df_plasma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.