Compare target and current testing ‘near
equality’. If they are different, comparison is still made to
some extent, and a report of the differences is returned. Do not
use all.equal directly in if expressions---either
use isTRUE(all.equal(....)) or identical if
appropriate.
# S3 method for nanoduration
all.equal(
target,
current,
tolerance = sqrt(.Machine$double.eps),
scale = NULL,
countEQ = FALSE,
formatFUN = function(err, what) format(err),
...,
check.attributes = TRUE
)# S4 method for nanoduration
all.equal(
target,
current,
tolerance = sqrt(.Machine$double.eps),
scale = NULL,
countEQ = FALSE,
formatFUN = function(err, what) format(err),
...,
check.attributes = TRUE
)
nanoduration arguments to be compared
numeric >= 0. Differences smaller than
tolerance are not reported. The default value is close
to 1.5e-8.
NULL or numeric > 0, typically of length 1 or
length(target). See ‘Details’.
logical indicating if the target == current cases should be
counted when computing the mean (absolute or relative)
differences. The default, FALSE may seem misleading in
cases where target and current only differ in a few
places; see the extensive example.
a function of two arguments, err, the relative, absolute
or scaled error, and what, a character string indicating
the _kind_ of error; maybe used, e.g., to format relative and
absolute errors differently.
further arguments for different methods
logical indicating if the attributes of target
and current (other than the names) should be compared.