impute: impute missing values

View source: R/generics.R

imputeR Documentation

impute missing values

Description

impute missing values

Usage

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)

Arguments

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".

Value

An object after imputing missing values.

Note

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.

Examples

data(df_plasma)
d <- impute(df_plasma)


metabolomicsR documentation built on April 29, 2022, 9:05 a.m.