Retrieve per-cell ARA diagnostics from an add_mspaf() result
Source: R/reference_model.R
ara_summary.RdAfter calling add_mspaf() with a reference_model (or any reference),
this accessor returns a tibble describing what happened in the ARA
subtraction for every (sample × analyte) that was assessed. This is the
primary tool for auditing the "reference higher than target" case (floored
to zero) and for understanding which tier was used per cell.
Arguments
- x
A data frame returned by
add_mspaf().
Value
A tibble with columns:
sample_idSample identifier.
analyteAnalyte name.
ref_normNormalised reference concentration subtracted.
C_normNormalised target concentration (before ARA).
C_adjARA-adjusted concentration (
max(C_norm - ref_norm, 0)).C_excessUnfloored difference
C_norm - ref_norm; negative values indicate the reference exceeded the target — possibly a geogenic artefact (e.g. low-pH upstream metal mobilisation).floor_firedLogical;
TRUEwhenC_norm < ref_norm.ref_source"disabled","matched", or"unmatched".ref_tier"matched","model","model_integrated", or"static".NAfor non-temporal reference.
Returns NULL (with a message) if the attribute is absent.
Details
The attribute is stored by add_mspaf() and is dropped by most dplyr
verbs, so read the summary before further wrangling.