-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathflag_runs.Rd
37 lines (34 loc) · 1.02 KB
/
flag_runs.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Quality_checking.R
\name{flag_runs}
\alias{flag_runs}
\title{Flag Runs of Equal Values}
\usage{
flag_runs(x, name_out = "-", length = 4)
}
\arguments{
\item{x}{A numeric atomic type with NULL dimensions.}
\item{name_out}{A character string providing \code{varnames} attribute value
of the output.}
\item{length}{A numeric value. The minimum number of repeating values to
trigger flagging.}
}
\value{
An integer vector with the same length as \code{x}. Its
\code{varnames} and \code{units} attributes are set to \code{name_out} and
\code{"-"} values, respectively.
}
\description{
Identify and flag values of runs with repeating values in a vector.
}
\details{
\code{NA} values are omitted before evaluation of runs. Thus \code{NA}s do
not interrupt runs. Flagging is done according to the 0 - 2 quality control
flag scheme.
}
\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")
}