flag_data: Simple quality control on sample-feature matrices

Description Usage Arguments Value

Description

Many methods have restrictions on the data they can use (most notably missing data). This is a simple function for assessing the quality of input data. By default it looks for missing (NA) data although the the trigger condition can be modified.

Usage

1
2
flag_data(m, flag_fxn = is.na, filter = FALSE, thresh = c(0.2, 0.2),
  plot = FALSE, print = TRUE)

Arguments

m

A sample-feature matrix.

flag_fxn

A boolean function that detects problematic data.

filter

logical wether to filter the data. The rows (resp. columns) with a percentage of flagged data greater than thresh[1] (resp. thresh[2]) are removed.

thresh

threshold vector: first for rows, second for columns.

plot

logical, to plot the histogram of the percentage of flagged values per rows or columns.

print

logical, to print informations on the number of flagged elements in the data.

Value

The filtered data if filter is TRUE. Nothing otherwise.


agapow/subtypr documentation built on May 5, 2019, 1:33 a.m.