rtqc_rate_alt: Rate Test (Alternate)

Description Usage Arguments Value Examples

View source: R/rtqc.r

Description

Perform a rate of change test. This is a variant of rtqc_flat() which checks the absolute rate of change over a given number of observations (defined as the absolute value of the average of the rates of change between successive observations)

Usage

1
rtqc_rate_alt(x, threshold, n.prior)

Arguments

x

A vector of values.

threshold

The absolute rate of change over a set of observations. A rate of change above this value will flag the final data point in the set.

n.prior

the number of prior observations to calculate the rate of change over, excluding the current observation.

Value

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

Examples

1
2
fake.data = c(rnorm(10,10), rnorm(10, 50), rnorm(10,10))
rtqc_rate_alt(fake.data, 20, 3)

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