[This article was first published on

**RStats – Tom Hopper**, and kindly contributed to

R-bloggers]. (You can report issue about the content on this page

here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t.

My simple package of useful numeric functions, *numbr*, has been updated to version 0.11.3 and posted to GitHub. You can install it with the command

devtools::install_github("tomhopper/numbr")

0.11.3 adds the `%==%`

operator. `%==%`

implements the base R function `all.equal()`

, comparing two numeric or integer vectors for near-equality. Unlike `all.equal`

, `%==%`

returns a vector for every element of the left-hand and right-hand sides. This makes it useful in functions like `which`

or `dplyr::filter`

.

I use `%==%`

when making comparisons between columns of a data frame that have been calculated and may have differences due to machine accuracy errors.

`%==%`

currently uses the defaults for other parameters to `all.equal`

(most notably `tolerance`

), and no method is implemented to alter those parameters in this version.

Full documentation of the functions in *numbr* can be found at tomhopper/numbr.

*Related*

If you got this far, why not

__subscribe for updates__ from the site? Choose your flavor:

e-mail,

twitter,

RSS, or

facebook…