Impute: Impute missing values

Description Usage Arguments Details Value Author(s) Examples

Description

Impute missing values in gene expression data set using nearest neighbor averaging or remove the genes with missing values directly.

Usage

1
Impute(dataset, method = IMPUTE.method.knn, k = 10)

Arguments

dataset

a numeric matrix of gene expressions or a Study object. For matrix, each row is for one gene and each column is for one sample. The row names are gene symbols. For Study object, the same rule applies to matrix in Study@datasets

method

a character string to specify how to deal with the missing values. It could be "impute" or "remove", which means to impute missing values using nearest neighbor averaging or remove the genes with missing values directly.

k

the number of neighbors to be used in the imputation. The default is 10.

Details

See also knnImputation.

Value

A matrix of the gene expressions after dealing with missing values.

Author(s)

Lin Wang, Schwannden Kuo

Examples

1
2
3
4
5
6
7
data(datasets.eg)
data(preproc.option)
# Impute for expression matrix
res <- Impute(datasets.eg[[1]], method=IMPUTE.method.knn)
# Impute for Study object
study <- new("Study", name="test", dtype=DTYPE.microarray, datasets=datasets.eg[1])
res <- Impute(study, method=IMPUTE.method.remove)

metaOmic/preproc documentation built on May 22, 2019, 6:54 p.m.