adjust_matrix {cola} | R Documentation |
Remove rows with low variance and impute missing values
adjust_matrix(m, sd_quantile = 0.05, max_na = 0.25)
m |
A numeric matrix. |
sd_quantile |
Cutoff of 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 it are removed. |
The function uses impute.knn
to impute missing values, then
uses adjust_outlier
to adjust outliers and
removes rows with low standard deviations.
A numeric matrix.
Zuguang Gu <z.gu@dkfz.de>
m = matrix(rnorm(200), 10) rownames(m) = letters[1:10] m[1, 1] = 1000 range(m) m2 = adjust_matrix(m) range(m2)