
Compare the values of two objects to check whether they are equal
Source:R/gradethis_equal.R
      gradethis_equal.RdCompare the values of two objects to check whether they are equal
Arguments
- x, y
 Two objects to compare
- ...
 Additional arguments passed to methods
- tolerance
 If non-
NULL, used as threshold for ignoring small floating point difference when comparing numeric vectors. Using any non-NULLvalue will cause integer and double vectors to be compared based on their values, not their types, and will ignore the difference betweenNaNandNA_real_.It uses the same algorithm as
all.equal(), i.e., first we generatex_diffandy_diffby subsettingxandyto look only locations with differences. Then we check thatmean(abs(x_diff - y_diff)) / mean(abs(y_diff))(or justmean(abs(x_diff - y_diff))ify_diffis small) is less thantolerance.
Value
A logical value of length one, or an internal gradethis error.
Methods (by class)
gradethis_equal(default): The default comparison method, which uses waldo::comparegradethis_equal(list): The comparison method for lists