Run pointblank validation on a Measurements table
Source:R/fct_validate_pointblank.R
pb_validate_measurements.RdApplies pointblank validation rules to check data quality and schema
compliance for an eData Measurements table. Checks that core identifier
fields are non-null, sampling dates are within valid ranges, environmental
compartments are valid, measurement flags and values are consistent, LOD/LOQ
values and units are present and valid when provided, protocol IDs match the
expected format, MEASURED_TYPE is in its controlled vocabulary, and reference
and sample IDs are present and correctly formatted.
Value
If agent = TRUE, a pointblank agent object containing validation results.
If agent = FALSE, the input data with validation failures removed.
Details
Validation thresholds are configured using pointblank::action_levels().
See also
pb_validate_edata_table() for the underlying validation framework,
pb_validate_all_edata_tables() to validate all tables at once,
protocol_id_regex() for the protocol ID format validated here,
sample_id_regex() for the sample ID format validated here,
measured_types_vocabulary() for valid MEASURED_TYPE values,
parameter_unit_vocabulary() for valid unit values,
protocol_options_vocabulary() for valid protocol names,
example_measurements_tibble() for an example Measurements table.
Other validation:
pb_validate_CREED_data_relevance(),
pb_validate_CREED_data_reliability(),
pb_validate_CREED_scores(),
pb_validate_all_edata_tables(),
pb_validate_biota(),
pb_validate_campaign(),
pb_validate_edata_table(),
pb_validate_methods(),
pb_validate_parameters(),
pb_validate_reference(),
pb_validate_samples(),
pb_validate_sites()
Examples
if (FALSE) { # \dontrun{
pb_validate_measurements(example_measurements_tibble())
} # }