Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

equality

Check difference and / or equality of numbers


Description

Check if one number is greater/lower than or equal to another.

Usage

agteb(a, b)
alteb(a, b)
aeqb(a, b)

Arguments

a

Numerical vector of numbers

b

Numerical vector of numbers

Details

Not all numbers (especially the decimal ones) can be represented exactly in floating point arithmetic, and their arithmetic may not give the normal expected result.

Function agteb() checks if a number a is “greater than or equal to” (gte) another number b. In the same spirit, function alteb() checks if a number a is “lower than or equal to” (lte) another number b, while function aeqb() checks for their equality (eq).

Author(s)

Adrian Dusa

References

Goldberg, David (1991) "What Every Computer Scientist Should Know About Floating-point Arithmetic", ACM Computing Surveys vol.23, no.1, pp.5-48, doi: 10.1145/103162.103163


admisc

Adrian Dusa's Miscellaneous

v0.12
GPL (>= 3)
Authors
Adrian Dusa [aut, cre, cph] (<https://orcid.org/0000-0002-3525-9253>)
Initial release
2021-03-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.