Update QC flag severity
Arguments
- flag
character vector of current flag values; each element must be one of
"pass","suspect", or"fail".- level
scalar character string — the new flag level to apply (
"pass","suspect", or"fail").- condition
logical vector the same length as
flag. Elements that areTRUEand whose current flag is less severe thanlevelwill be upgraded.NAvalues inconditionare treated asFALSE.
Value
Character vector the same length as flag with flags updated
where condition is TRUE and level is more severe
than the existing flag.