mv_filter: Filtering variable based on the percentage of missing values

View source: R/mt_extra.R

mv_filterR Documentation

Filtering variable based on the percentage of missing values

Description

This function calculates the percentage of missing values and keeps those features with missing values percentage less than the designed threshold.

Usage

mv_filter(x, thres = 0.3)

Arguments

x

a data matrix. The columns are features.

thres

threshold of missing values. Features less than this threshold will be kept. Value has to be between 0 and 1.

Value

a list of with contents:

  • dat the filtered data matrix

  • idx a logical vector of index for keeping features.

See Also

mv_perc()

Other variable filters: blank_filter(), locfdr_filter(), qc_filter(), rsd_filter(), var_filter()

Examples

meta <- mtExtra:::meta
mv_perc(meta)
mv_filter(meta, thres = 0.3)

wanchanglin/mtExtra documentation built on Aug. 2, 2024, 5:47 p.m.