Description Usage Arguments Details Value
Values of x
are checked against two specified thresholds to obtain
their quality control (qc) flags.
1 |
x |
A numeric atomic type with |
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'. |
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"
If x <= thr[1]
, QC flag = 0.
If x > thr[1] & x <= thr[2]
, QC flag = 1.
If x > thr[2]
, QC flag = 2.
For flag = "outside"
If x >= thr[1] & x <= thr[2]
, QC flag = 0.
If x < thr[1] | x > thr[2]
, QC flag = 2.
For flag = "between"
If x <= thr[1] | x >= thr[2]
, QC flag = 0.
If x > thr[1] & x < thr[2]
, QC flag = 2.
For flag = "lower"
If x >= thr[1]
, QC flag = 0.
If x < thr[1] & x >= thr[2]
, QC flag = 1.
If x < thr[2]
, QC flag = 2.
This is a modified version of the function of the same name in the R package "openeddy".
An integer vector with the same length as x
. Its
varnames
and units
attributes are set to name_out
and
"-"
values, respectively.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.