impute_simple: Simple imputation

Description Usage Arguments Details Examples

View source: R/transformations.R

Description

Impute missing values using a simple imputation strategy. All missing values of a feature are imputed with the same value. It is possible to only impute features with a large number of missing values this way. This can be useful for using this function before random forest imputation to speed things up. The imputation strategies available are:

Usage

1
impute_simple(object, value, na_limit = 0)

Arguments

object

a MetaboSet object

value

the value used for imputation, either a numeric or one of "min", "half_min", "small_random", see above

na_limit

only impute features with the proportion of NAs over this limit. For example, if na_limit = 0.5, only features with at least half of the values missing are imputed.

Details

Examples

1
2
missing <- mark_nas(merged_sample, 0)
imputed <- impute_simple(missing, value = "min")

antonvsdata/amp documentation built on Jan. 8, 2020, 3:15 a.m.