imputeRowMin: Replace missing values with a proportion of the row minimum

View source: R/functions-imputation.R

imputeRowMinR Documentation

Replace missing values with a proportion of the row minimum

Description

imputeRowMin imputes missing values in x by replacing NAs in each row with a proportion of the minimal value for that row (i.e. min_fraction * min(x[i, ])).

Usage

imputeRowMin(x, min_fraction = 1/2)

Arguments

x

matrix with abundances, rows being features/metabolites and columns samples.

min_fraction

numeric(1) with the fraction of the row minimum that should be used to replace NA values in that row.

Author(s)

Johannes Rainer

See Also

imputeLCMD package for more left censored imputation functions.

Other imputation functions: imputeRowMinRand

Examples


library(faahKO)
data("faahko")

xset <- group(faahko)
mat <- groupval(xset, value = "into")

mat_imp <- imputeRowMin(mat)

head(mat)
head(mat_imp)

## Replace with 1/8 of the row mimimum
head(imputeRowMin(mat, min_fraction = 1/8))

xiaodfeng/DynamicXCMS documentation built on Aug. 6, 2023, 3:02 p.m.