adjust_matrix {cola}R Documentation

Remove rows with low variance and impute missing values

Description

Remove rows with low variance and impute missing values

Usage

adjust_matrix(m, sd_quantile = 0.05, max_na = 0.25)

Arguments

m

a numeric matrix.

sd_quantile

cutoff the quantile of standard deviation Rows with standard deviation less than it are removed.

max_na

maximum NA fraction in each row. Rows with NA fraction larger than this value are removed.

Details

The function uses impute.knn to impute missing values, then uses adjust_outlier to adjust outliers and removes rows with low standard deviations.

Value

A numeric matrix.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

Examples

m = matrix(rnorm(200), 10)
rownames(m) = letters[1:10]
m[1, 1] = 1000
range(m)
m2 = adjust_matrix(m)
range(m2)

[Package cola version 1.0.0 Index]