Learn R Programming

specmine (version 1.0)

flat_pattern_filter: Flat pattern filter

Description

Performs a flat pattern filter over the dataset.

Usage

flat_pattern_filter(dataset, filter.function = "iqr", by.percent = T, by.threshold = F, red.value = 0)

Arguments

dataset
list representing the dataset from a metabolomics experiment.
filter.function
filter function. It can be:
  • "iqr" - Interquantile Range
  • "rsd" - Relative Standard Deviation
  • "sd" - Standard Deviation
  • "mad" - Median Absolute Deviation
  • "mean" - Mean
  • "median" - Median

by.percent
boolean value, if T the number of variables to filter will be a percentage of the number of variables in the dataset; percentage is given by the "red.value" parameter
by.threshold
boolean value, if T, defines filtering will select variables where values of filtering function are below a given threshold. Threshold is defined by red.value that defines the minimum value of the function needed to keep the variable.
red.value
it can be the percentage or the threshold number. If red.value = "auto", will calculate number of variables to remove automatically

Value

Returns the dataset with the data filtered.

Examples

Run this code
  ## Example of flat pattern filter
  data(cassavaPPD)
  dataset.filtered = flat_pattern_filter(cassavaPPD, "iqr", by.percent = TRUE, 
		     red.value = 20)

Run the code above in your browser using DataLab