Skip to contents

Applies 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.

Usage

pb_validate_measurements(data, actions = action_levels(), agent = TRUE)

Arguments

data

Data frame containing Measurements table data to validate

actions

Action levels for pointblank agent (only used when agent = TRUE)

agent

Logical. If TRUE (default), returns a pointblank agent object. If FALSE, returns the validated data with validation failures removed.

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().

Examples

if (FALSE) { # \dontrun{
pb_validate_measurements(example_measurements_tibble())
} # }