check_constancy: Validation by constance

Description Usage Arguments References See Also

Description

Validates timeseries data by computing the difference of data points within given window width. Consecutive data points can be defined as constant by two approaches (s. parameter "method"). The output is an xts-object with logical values. TRUE indicates constancy, FALSE inconstancy.

Usage

1
2
check_constancy(xts, delta_max, width, method = "all", lag = 1,
  relative = FALSE, verbose = TRUE)

Arguments

xts

An xts object to be validated.

delta_max

The treshold of constance. Computed differences lower than delta_max are considered to be constant, otherwise inconstant.

width

An integer specifying the window width.

method

Either "all" or "minmax". Determines the way differences within width are calculated. If set to "all", the differences of all data points within width must be lower then delta_max fo fulfill constancy criteria. If set to "minmax", data points are considered to be constant if the absolute difference of min(x) and max(x) within width is lower than delta_max.

lag

An integer indicating which lag to use (condition: method is "all")

relative

logical. Should differences computed absolute (|x_i - x_i-1|) or relative ((|x_i - x_i-1|)/x_i) (condition: method is "all")?

verbose

logical. Provide additional details?

References

DWA (2011). Merkblatt DWA-M 181 - Messung von Wasserstand und Durchfluss in Entwaesserungssystemen. Hennef.

See Also

xts, diff, rollapply.


dleutnant/m181 documentation built on May 15, 2019, 9:16 a.m.