rtqc_spike_alt: Spike Test (Alternate)

Description Usage Arguments Value Examples

View source: R/rtqc.r

Description

Perform a spike test. This is a variant of rtqc_spike() which checks the absolute difference between the current measurement and the previous/next measurements.

Usage

1
rtqc_spike_alt(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.