imputeRowMin {xcms} | R Documentation

## Replace missing values with a proportion of the row minimum

### Description

`imputeRowMin` imputes missing values in `x` by replacing `NA`s 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))

[Package xcms version 3.16.1 Index]