Description Usage Arguments Details Value Note Author(s) See Also Examples

These functions perform simple order comparisons for two arguments, dealing with the machine inaccuracy for floating point arithmetics.

1 2 3 4 5 6 |

`x` |
first argument (must be a numeric scalar) |

`y` |
second argument (must be a numeric scalar) |

`tol` |
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 `==`

, `!=`

, `>=`

, `>`

, `<=`

and `<`

.

The functions return a logical `TRUE`

if their condition holds, and a logical `FALSE`

otherwise.

`eq(x, y)`

checks whether `x`

is equal to `y`

`ne(x, y)`

checks whether `x`

is not equal to `y`

`ge(x, y)`

checks whether `x`

is greater than or equal to `y`

`gt(x, y)`

checks whether `x`

is greater than `y`

`le(x, y)`

checks whether `x`

is less than or equal to `y`

`lt(x, y)`

checks whether `x`

is less than `y`

These functions cannot be used in a vectorized fashion.

Marc Vandemeulebroecke

1 2 3 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.