apply.scale {MiMIR} | R Documentation |
apply.scale
Description
Helper function created to scale the NH-metabolomics matrix samples
Usage
apply.scale(dat, MEAN, SD, quiet = TRUE)
Arguments
dat |
numeric data-frame with Nightingale-metabolomics |
MEAN |
numeric vector indicating the mean of the metabolites present in dat |
SD |
numeric vector indicating the standard deviations of the metabolites present in dat |
quiet |
Tlogical to suppress the messages in the console |
Value
The matrix z-scaling the Nightingale-metabolomics dataset using the given Means and SDs
References
This function is constructed to be able to apply the metaboAge as described in: van den Akker Erik B. et al. (2020) Metabolic Age Based on the BBMRI-NL 1H-NMR Metabolomics Repository as Biomarker of Age-related Disease. Circulation: Genomic and Precision Medicine, 13, 541-547, doi:10.1161/CIRCGEN.119.002610
See Also
QCprep, apply.fit, subset_metabolites_overlap, subset_samples_miss, subset_samples_zero, subset_samples_sd, impute_miss, and report.dim
Examples
## Not run:
library(MiMIR)
#load the Nightignale metabolomics dataset
metabolic_measures <- read.csv("Nightingale_file_path",header = TRUE, row.names = 1)
#Apply the scaling to the metabolic features
mat <- apply.scale(metabolic_measures, MEAN=PARAM_metaboAge$MEAN, SD=PARAM_metaboAge$SD)
## End(Not run)