Perform a range test. For more information see U.S. Integrated Ocean Observing System, 2015. Manual for Real-Time Quality Control of In-situ Temperature and Salinity Data Version 2.0: A Guide to Quality Control and Quality Assurance of In-situ Temperature and Salinity Observations. 56 pp. DOI: 10.7289/V5V40SD4.

rtqc_range(x, user.range, sensor.range)

Arguments

x

A vector of values.

user.range

A length-2 numeric vector identifying a reasonable measurement range for the provided data x. Typically specific to location and/or climate and based on expert judgment.

sensor.range

A length-2 numeric vector identifying the sensor measurement range.

Value

An ordered factor of test flags of same length as x.

Examples

fake.data = c(rnorm(3, 10), rep(c(-5, 30), each = 3), rep(c(5, 20), each = 3)) rtqc_range(fake.data, c(7, 15), c(0, 25))
#> [1] pass pass pass fail fail fail fail fail fail #> [10] suspect suspect suspect suspect suspect suspect #> Levels: pass < not evaluated < suspect < fail