rtqc_gap: Gap Test

Description Usage Arguments Value Examples

View source: R/rtqc.r

Description

Perform a data gap test. For more information see U.S. Integrated Ocean Observing System, 2015. Manual for Real-Time Quality Control of In-situ Temperature and Salinity Data Version 2.0: A Guide to Quality Control and Quality Assurance of In-situ Temperature and Salinity Observations. 56 pp. DOI: 10.7289/V5V40SD4.

Usage

1
rtqc_gap(x, increment, condition = c("is", "less than", "greater than"))

Arguments

x

A vector of timestamps.

increment

A character string defining the expected time increment. this consists of two parts: a numeric value defining the size of the increment, and the units of the increment. Acceptable units are "secs", "mins", "hours", "days", or "weeks".

condition

A character string specifying the required condition. "is" specifies that the interval between observations must be exactly the supplied increment. "less than" or "greater than" specify that the interval must be at most or at least the specified increment, respectively.

Value

An ordered factor of test flags of same length as x.

Examples

1
2
3
4
5
6
7
8
# Application to 15-minute data:
fake.timestamps = c(
  seq(as.POSIXct("2018-01-01"), by = "15 mins", length.out = 5),
  rep(as.POSIXct("2018-01-01 01:00:00"), 3),
  as.POSIXct("2018-01-01 04:00:00")
)
rtqc_gap(fake.timestamps, "16 mins", "less than")
rtqc_gap(fake.timestamps, "15 mins", "is")

SuisunMarshBranch/wqptools documentation built on May 1, 2021, 2:21 a.m.