Learn R Programming

specmine (version 1.0)

impute_nas_knn: Impute missing values with KNN

Description

Impute missing values with KNN

Usage

impute_nas_knn(dataset, k = 10, ...)

Arguments

dataset
list representing the dataset from a metabolomics experiment.
k
the number of nearest neighbors.
...
additional values to impute.knn function.

Value

Returns the dataset with no missing values.

Examples

Run this code
  ## Example of NA imputation with knn
  data(propolis)
  dataset = impute_nas_knn(propolis, k=10)

Run the code above in your browser using DataLab