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
Pfister, R., Tonn, S., Schaaf, M., Wirth, R. (2024). mousetRajectory: Mouse tracking analyses for behavioral scientists. The Quantitative Methods for Psychology, 20(3), 217-229. doi:10.20982/tqmp.20.3.p217