| flat_pattern_filter | R Documentation |
Performs a flat pattern filter over the dataset.
flat_pattern_filter(
dataset,
filter.function = "iqr",
by.percent = TRUE,
by.threshold = FALSE,
red.value = 0
)
dataset |
A dataset object to filter. |
filter.function |
Filtering function to use. One of '"iqr"', '"rsd"', '"rnsd"', '"sd"', '"mad"', '"mean"', or '"median"'. |
by.percent |
Logical. If 'TRUE', the number of variables to filter will be defined as a percentage of the number of variables in the dataset; percentage is given by 'red.value'. |
by.threshold |
Logical. If 'TRUE', filtering selects variables where the filtering function is above or equal to a threshold. |
red.value |
Reduction value. If 'by.percent = TRUE', this is the percentage of variables to remove, or '"auto"' for automatic calculation. If 'by.threshold = TRUE', this is the minimum value needed to keep the variable. |
A dataset object with the same overall structure as the input, where 'dataset$data' has been filtered according to the selected flat-pattern criterion. Variables failing the selection rule are removed, the remaining dataset components are preserved, and 'dataset$description' is updated to record the filtering step.
if (requireNamespace("specmine.datasets", quietly = TRUE)) {
data(propolis, package = "specmine.datasets")
propolis_proc = missingvalues_imputation(propolis)
propolis_proc = flat_pattern_filter(propolis_proc, "iqr",
by.percent = TRUE, red.value = 75)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.