imputeKNN: Impute missing values/NAs with KNN

Description Usage Arguments Value Examples

View source: R/imputeKNN.R

Description

Impute missing values/NAs with KNN

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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", "atac", "bisulfite")

Value

Imputed data matrix that is added to the assays slot

Examples

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

JordanVeldboom/compartmap documentation built on July 3, 2020, 6:32 p.m.