Skip to contents

This function excludes specified analyses from a MidarExperiment object, either by marking them as invalid for downstream processing or by overwriting the current analysis flags. The function also handles the case where no analyses are specified, allowing the option to reset the exclusions.

Usage

exclude_analyses(data = NULL, analyses_to_exclude, replace_existing)

Arguments

data

A MidarExperiment object

analyses_to_exclude

A character vector of analysis IDs (case-sensitive) to be excluded from the dataset. If this is NA or an empty vector, the exclusion behavior will be handled as per the replace_existing flag.

replace_existing

A logical value. If TRUE, existing valid_analysis flags will be overwritten. If FALSE, the exclusions will be appended, preserving any existing valid analyses.

Value

A modified MidarExperiment object with the specified analyses defined as excluded.