missingvalues_imputation: Missing values imputation

Description Usage Arguments Value Examples

Description

Treats the missing values of a dataset according to a specific method.

Usage

1
2
missingvalues_imputation(dataset, method = "value", 
value = 5e-04, k = 5)

Arguments

dataset

list representing the dataset from a metabolomics experiment.

method

imputation method. It can be:

  • "value" - replaces the missing values with a specific value

  • "mean" - replaces the missing values with the mean of the variables' values

  • "median" - replaces the missing values with the median of the variables' values

  • "knn" - replaces the missing values with k nearest neighbor averaging

  • "linapprox" - replaces the missing values with linear approximation

value

the value to replace the missing values if the method is "value".

k

the number of neighbors if the method is "knn".

Value

Returns the dataset with no missing values.

Examples

1
2
3
4
5
  ## Example of impute missing values
  library(specmine.datasets)
  data(propolis)
  dataset = missingvalues_imputation(propolis, method = "value", 
	    value = 0.0005)

specmine documentation built on Sept. 21, 2021, 5:06 p.m.