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.
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 thereplace_existing
flag.- replace_existing
A logical value. If
TRUE
, existingvalid_analysis
flags will be overwritten. IfFALSE
, the exclusions will be appended, preserving any existing valid analyses.