poplin_impute: Imputation methods

Description Usage Arguments Value See Also Examples

Description

Missing values are frequently found in metabolomics data. The poplin package provides a few options to handle them. poplin_impute is a wrapper for the following set of functions:

impute_randomforest:

random forest imputation

impute_knn:

k-nearest neighbor (KNN) imputation

impute_pca:

principal component analysis (PCA) imputation

impute_univariate:

univariate imputation (e.g., half-minimum, mean, median)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'matrix'
poplin_impute(x, method = c("knn", "randomforest", "pca", "univariate"), ...)

## S4 method for signature 'poplin'
poplin_impute(
  x,
  method = c("knn", "randomforest", "pca", "univariate"),
  xin,
  xout,
  ...
)

Arguments

x

A matrix or poplin object.

method

The imputation method to be used, defaulting to "knn".

...

Arguments passed to a specific imputation method.

xin

Character specifying the name of data to retrieve from x when x is a poplin object.

xout

Character specifying the name of data to store in x when x is a poplin object.

Value

A matrix or poplin object of the same dimension as x containing the imputed intensities.

See Also

Other imputation methods: impute_knn(), impute_pca(), impute_randomforest(), impute_univariate()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(faahko_poplin)

if (requireNamespace("VIM", quietly = TRUE)) {
 ## poplin object
 poplin_impute(faahko_poplin, method = "knn", xin = "raw", xout = "knn")

 ## matrix
 m <- poplin_raw(faahko_poplin, "raw")
 poplin_impute(m, method = "knn")
}

jaehyunjoo/poplin documentation built on Jan. 8, 2022, 1:13 a.m.