Functions to perform simple order comparisons
These functions perform simple order comparisons for two arguments, dealing with the machine inaccuracy for floating point arithmetics.
1 2 3 4 5 6
first argument (must be a numeric scalar)
second argument (must be a numeric scalar)
comparison tolerance; differences smaller than
When comparing two numeric scalars (e.g., for equality), machine inaccuracy can be the source of obviously erroneous results. These functions perform binary order comparisons that are tolerant towards machine inaccuracy, as an alternative to the standard comparators
The functions return a logical
TRUE if their condition holds, and a logical
eq(x, y) checks whether
x is equal to
ne(x, y) checks whether
x is not equal to
ge(x, y) checks whether
x is greater than or equal to
gt(x, y) checks whether
x is greater than
le(x, y) checks whether
x is less than or equal to
lt(x, y) checks whether
x is less than
These functions cannot be used in a vectorized fashion.
1 2 3
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.