flag: Creates flag vector based on input data

Description Usage Arguments Value Author(s) Examples

Description

Creates flag vector with codes and methods according to params list.

Usage

1
flag(x, flag.defs, ...)

Arguments

x

data

flag.defs

definitions for flagging

...

additional defs for flags

Value

a vector of flags of length equal to number of rows in data.in

Author(s)

Jordan S. Read

Examples

1
2
3
4
5
6
7
8
dates <- seq(as.POSIXct('1999-01-01'),by=1,length.out=14)
values <- c(runif(12,2,4),NA,NA)
data.in <- data.frame("DateTime"=dates,"sensor.obs"=values)
simple.sqc <- list(list(expression="x == 999999",type="error_code",description="logger error code"),
             list(expression='is.na(x)',type='error_code',description='missing data'))

flag(data.in, "x == 999999")
flag(data.in,simple.sqc)

USGS-R/sensorQC documentation built on May 9, 2019, 8:46 p.m.