flag_thr: Flag Based on Static Threshold Values

Description Usage Arguments Details Value

Description

Values of x are checked against two specified thresholds to obtain their quality control (qc) flags.

Usage

1
flag_thr(x, thr, flag = c("higher", "outside", "between", "lower"))

Arguments

x

A numeric atomic type with NULL dimensions.

thr

A numeric vector with 2 non-missing values.

flag

A character string. Selects one of the available flagging approaches. Can be abbreviated. See 'Details'.

Details

This function is called by extract_qc but can be useful on its own when filtering values of variable according to the 0 - 2 qc flag scheme.

Obtained qc flags are assigned in the range 0 - 2 according to these rules:

For flag = "higher"

For flag = "outside"

For flag = "between"

For flag = "lower"

This is a modified version of the function of the same name in the R package "openeddy".

Value

An integer vector with the same length as x. Its varnames and units attributes are set to name_out and "-" values, respectively.


grahamstewart12/tidyflux documentation built on June 4, 2019, 7:44 a.m.