Learn R Programming

metabolomicsR (version 1.0.0)

impute: impute missing values

Description

impute missing values

Usage

impute(object, method)

# S3 method for Metabolite impute(object, method = c("half-min", "median", "mean", "zero", "kNN"))

# S3 method for default 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.

Examples

Run this code
# NOT RUN {
data(df_plasma)
d <- impute(df_plasma)

# }

Run the code above in your browser using DataLab