Skip to contents

Removes all features that have been flagged by quality control functions. Only features that do not have a flag (Flag == NA) are retained.

Usage

drop_flagged(object, all_features = FALSE)

# S4 method for class 'MetaboSet'
drop_flagged(object, all_features = FALSE)

# S4 method for class 'SummarizedExperiment'
drop_flagged(object, all_features = FALSE)

Arguments

object

a SummarizedExperiment or MetaboSet object

all_features

logical, should all features be retained? Mainly used by internal functions

Value

A SummarizedExperiment or MetaboSet object without the previously flagged features.

Examples

data(example_set)
dim(example_set)
#> [1] 80 50
flagged <- flag_quality(example_set)
#> INFO [2025-06-23 22:36:32] 
#> 92% of features flagged for low quality
noflags <- drop_flagged(flagged)
dim(noflags)
#> [1]  6 50