QC_invalidateConsecutiveSuspectValues: Invalidate consecutive suspect values.

View source: R/utils-QC.R

QC_invalidateConsecutiveSuspectValuesR Documentation

Invalidate consecutive suspect values.

Description

Invalidates values within a timeseries that appear "sticky". Some temporary monitoring data has stretches of consecutive values, sometimes well outside the range of reasonable. This QC function identifies these "sticky" stretches and returns the original timeseries data with "sticky" stretches replaced with NA.

Usage

QC_invalidateConsecutiveSuspectValues(
  x = NULL,
  suspectValues = c(0:10 * 1000, NA),
  consecutiveCount = 2
)

Arguments

x

Timeseries data.

suspectValues

Vector of numeric values considered suspect.

consecutiveCount

How many suspectValues must appear in a row before they are invalidated.

Value

Returns x with some values potentially replaced with NA.


AirMonitor documentation built on Aug. 26, 2023, 1:08 a.m.