
Feature-wise KNN Imputation
impute_fw_knn.Rd
A wrapper around the impute::impute.knn()
.
Impute missing values with values from the k-nearest neighbors of the
corresponding feature.
Usage
impute_fw_knn(x, k = 5, by = NULL, ...)
# S3 method for class 'glyexp_experiment'
impute_fw_knn(x, k = 5, by = NULL, ...)
# S3 method for class 'matrix'
impute_fw_knn(x, k = 5, by = NULL, ...)
# Default S3 method
impute_fw_knn(x, k = 5, by = NULL, ...)
Arguments
- x
Either a
glyexp_experiment
object or a matrix. If a matrix, rows should be variables and columns should be samples.- k
The number of nearest neighbors to consider.
- by
Either a column name in
sample_info
(string) or a factor/vector specifying group assignments for each sample. Used for grouping when imputing missing values.- ...
Additional arguments to pass to
impute::impute.knn()
.