impute | R Documentation |
impute missing values
impute(object, method) ## S3 method for class 'Metabolite' impute(object, method = c("half-min", "median", "mean", "zero", "kNN")) ## Default S3 method: impute(object, method = "half-min") impute_kNN(object)
object |
An object, a vector, data.frame, data.table or Metabolite. |
method |
Imputation method, the default method is half the minimum value (‘half-min') of the metabolite. Currently support ’half-min', "median", "mean", "zero", "kNN". |
An object after imputing missing values.
Wei, R., Wang, J., Su, M. et al. Missing Value Imputation Approach for Mass Spectrometry-based Metabolomics Data. Sci Rep 8, 663 (2018). https://doi.org/10.1038/s41598-017-19120-0
'impute_kNN': Imputation using nearest neighbor averaging (kNN) method, the input is a Metabolite object, assayData was first transposed to row as metabolties and column as samples.
data(df_plasma) d <- impute(df_plasma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.