powered by
The function almost.equal tests if two numeric vectors have equal values up to a tolerance.
almost.equal
almost.equal(x, y, tolerance = sqrt(.Machine$double.eps))
numeric vector.
numeric vector of the same length as x.
x
numeric. Differences smaller than tolerance are considered as equal. The default value is close to 1.5e-8.
1.5e-8
A logical vector of the same length as x and y.
y
# NOT RUN { almost.equal(x = 1:3, y = 1:3 + c(10^(-6), 10^(-7), 10^(-8))) # }
Run the code above in your browser using DataLab