rtqc_spike: Spike test

Description Usage Arguments Value Examples

View source: R/rtqc.r

Description

Perform a spike 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.

Usage

1
rtqc_spike(x, spike.threshold)

Arguments

x

A vector of values.

spike.threshold

A length-2 list specifying "suspect" and "fail" thresholds. Each threshold can be either a single value (static threshold) or a vector of same length as x (dynamic threshold). Thresholds are typically specific to location and/or climate and based on expert judgment.

Value

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

Examples

1
2
fake.data = c(1, 1.1, 1, 1.2, 1, 1.3, 1, 1.4, 1, 1.5, 1)
rtqc_spike(fake.data, c(0.15, 0.25))

mkoohafkan/wqptools documentation built on May 2, 2021, 8:12 p.m.