Description Usage Arguments Value Author(s) Examples
The function almost.equal
tests if two numeric vectors
have equal values up to a tolerance.
1 | almost.equal(x, y, tolerance = sqrt(.Machine$double.eps))
|
x |
numeric vector. |
y |
numeric vector of the same length as |
tolerance |
numeric. Differences smaller than tolerance are considered as equal.
The default value is close to |
A logical vector of the same length as x
and y
.
Tommy on StackOverflow, see http://stackoverflow.com/a/7667703.
1 2 | almost.equal(x = 1:3,
y = 1:3 + c(10^(-6), 10^(-7), 10^(-8)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.