powered by
Treats the missing values of a dataset according to a specific method.
missingvalues_imputation(dataset, method = "value", value = 5e-04, k = 5)
list representing the dataset from a metabolomics experiment.
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
the value to replace the missing values if the method is "value".
the number of neighbors if the method is "knn".
Returns the dataset with no missing values.
# NOT RUN { ## Example of impute missing values library(specmine.datasets) data(propolis) dataset = missingvalues_imputation(propolis, method = "value", value = 0.0005) # }
Run the code above in your browser using DataLab