seasonder_rerun_qc_with_fun {SeaSondeR} | R Documentation |
Structured Restart for Quality Control
Description
Provides a structured restart mechanism to rerun the quality control (QC) function
with an alternative function during the execution of read_and_qc_field
.
This allows for a flexible error recovery strategy when the initial QC function fails
or is deemed inadequate.
Usage
seasonder_rerun_qc_with_fun(cond, qc_fun)
Arguments
cond |
The condition object captured during the execution of the
|
qc_fun |
An alternate quality control function to apply. This function should accept the value from the field as its sole argument and return a QC-applied value. |
Details
This function is meant to be used within custom condition handlers for the
read_and_qc_field
function.
Value
The value returned by the alternate quality control function.
Examples
# Example (expected to error due to missing restart):
val <- try(
seasonder_rerun_qc_with_fun(
list(seasonder_value = 42),
function(x) x * 2
),
silent = TRUE
)
print(val)
[Package SeaSondeR version 0.2.8 Index]