real-time-quality-control.rmd
] This vignette describes functions available for real-time quality control, i.e., the detection of data values outside some specification based on test procedures.
All real-time quality control functions accept a vector of data values, and may additionally require parameters such as
All functions return an ordered factor tagging each data value as “pass” (1), “suspect” (2), or “fail” (3). Note that not all tests are capable of producing any of the three outcomes; for example, the “gap test” only returns “pass” or “fail” flags, and the “rate of change test” only returns “pass” or “suspect” flags.
ODWGtools
provides the following functions for real-time quality control:
rtqc_gap()
: Test for data gaps.rtqc_range()
: Test that all data values fall within a specified range.rtqc_spike()
: Test for postive/negative spikes in the data.rtqc_rate()
: Test for extreme rate of change in data values.rtqc_flat()
: Test for repeated values or data flat-lining.rtqc_attenuation()
: Test signal attenuation (decrease in variance).We use the cder package to download a sample of Belden’s Landing salinity data to demonstrate the real-time quality control functions.
library(cder)
bdl = cdec_query("BDL", 100L, "E", "2018-07-01", "2018-08-01")