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

Description Usage Arguments Author(s) See Also Examples

View source: R/functions-imputation.R

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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))

yclement/xcms documentation built on April 10, 2020, 12:08 a.m.