Learn R Programming

specmine (version 3.1.6)

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
# NOT RUN {
  ## Example of NA imputation with knn
  library(specmine.datasets)
  data(propolis)
  dataset = impute_nas_knn(propolis, k=10)
# }

Run the code above in your browser using DataLab