Description Usage Arguments Value See Also Examples
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)
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,
...
)
|
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 |
xout |
Character specifying the name of data to store in |
A matrix or poplin object of the same dimension as
x
containing the imputed intensities.
Other imputation methods:
impute_knn()
,
impute_pca()
,
impute_randomforest()
,
impute_univariate()
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")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.