Checks if a numeric_vector
is monotonically in-/decreasing.
In particular, it always a good idea to check the time stamps of trajectory
data and verify that the logging worked properly.
Arguments
- numeric_vector
Number sequence to-be checked.
- decreasing
Should the
numeric_vector
be increasing or decreasing? Defaults toFALSE
.- strict
Must the values in-/decrease strictly? Defaults to
TRUE
, indicating that a strict, not a weak definition of monotony is applied.- warn
Will a warning be issued if the
numeric_vector
is not monotonic? Defaults toTRUE
.
Details
All objects of length 0 or 1 are monotonic. Data with missing values will not pass the check.
References
Wirth, R., Foerster, A., Kunde, W., & Pfister, R. (2020). Design choices: Empirical recommendations for designing two-dimensional finger tracking experiments. Behavior Research Methods, 52, 2394 - 2416. doi:10.3758/s13428-020-01409-0