seasonder_rerun_qc_with_fun | R Documentation |
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.
seasonder_rerun_qc_with_fun(cond, qc_fun)
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. |
This function is meant to be used within custom condition handlers for the
read_and_qc_field
function.
The value returned by the alternate quality control function.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.