allequal: Test if Two 'spam' Objects are (Nearly) Equal
Description
Utility to compare two spam objects
testing 'near equality'. Depending on the type of difference, comparison is
still made to some extent, and a report of the differences is
returned.
numeric >= 0. Differences smaller than
tolerance are not considered.
scale
numeric scalar > 0 (or NULL). See 'Details'.
check.attributes
currently not yet implemented.
...
Further arguments for different methods.
Value
Either TRUE or a vector of 'mode' "character" describing the
differences between
target and current.
Details
Numerical comparisons for
scale = NULL (the default) are done by
first computing the mean absolute difference of the two numerical
vectors. If this is smaller than tolerance or not finite,
absolute differences are used, otherwise relative differences
scaled by the mean absolute difference.
If scale is positive, absolute comparisons are made after
scaling (dividing) by scale.
Don't use all.equal.spam directly in if
expressions-either use isTRUE(all.equal.spam(....)) or
identical if appropriate.
Cholesky decomposition routines use this function to test for symmetry.