flag_runs: Flag Runs of Equal Values

View source: R/Quality_checking.R

flag_runsR Documentation

Flag Runs of Equal Values

Description

Identify and flag values of runs with repeating values in a vector.

Usage

flag_runs(x, name_out = "-", length = 4)

Arguments

x

A numeric atomic type with NULL dimensions.

name_out

A character string providing varnames attribute value of the output.

length

A numeric value. The minimum number of repeating values to trigger flagging.

Details

NA values are omitted before evaluation of runs. Thus NAs do not interrupt runs. Flagging is done according to the 0 - 2 quality control flag scheme.

Value

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

Examples

(xx <- c(rep(c(0, NA), 5)))
flag_runs(xx, "qc_xx_runs")
(yy <- rep(1:6, rep(c(2, 1), 3)))
flag_runs(yy, "qc_yy_runs")


lsigut/openeddy documentation built on Aug. 5, 2023, 12:25 a.m.