imputeKNN: Impute missing values/NAs with KNN

View source: R/imputeKNN.R

imputeKNNR Documentation

Impute missing values/NAs with KNN

Description

Impute missing values/NAs with KNN

Usage

imputeKNN(
  obj,
  rowmax = 0.5,
  colmax = 0.8,
  k = 10,
  maxp = 1500,
  in.place = TRUE,
  drop.sparse.samps = TRUE,
  assay = c("array", "atac", "bisulfite")
)

Arguments

obj

Input SummarizedExperiment object

rowmax

Maximum fraction of NAs that can exist in a row

colmax

Maximum fraction of NAs that can exist in a column/sample

k

Number of neighbors to be used in the imputation

maxp

Largest block of regions/loci imputed using KNN

in.place

Whether to modify the Beta/counts in place (default: TRUE)

drop.sparse.samps

Whether to drop samples that are too sparse (default: TRUE)

assay

The type of assay ("array", "bisulfite")

Value

Imputed data matrix that is added to the assays slot

Examples

data("meth_array_450k_chr14", package = "compartmap")
#impute
imputed <- imputeKNN(array.data.chr14, assay = "array")

biobenkj/compartmentalizer documentation built on Oct. 13, 2023, 5:26 p.m.