near | R Documentation |
A safe way to compare two floating point numbers. The function
is based on the near
function in the dplyr
package.
near(x, y, tol = .Machine$double.eps^0.5)
x , y |
Numeric vectors to compare |
tol |
Tolerance of comparison (Default: sqrt of the machine precision) |
TRUE
when x
and y
are near, otherwise FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.