all_equal2 | R Documentation |
A generalization of all.equal
that allows more than two
objects to be tested for near-equality.
all_equal2(
...,
tolerance = .Machine$double.eps^0.5,
scale = NULL,
check.attributes = TRUE,
use.names = TRUE,
all.names = TRUE,
check.names = TRUE
)
... |
any |
tolerance |
numeric >= 0; differences smaller than |
scale |
numeric scalar > 0 (or |
check.attributes |
logical indicating if the |
use.names |
logical indicating if |
all.names |
logical passed to |
check.names |
logical indicating if the |
If all ...
are nearly equal, TRUE
otherwise returns a list
with the objects that failed.
all.equal
; identical2
; identical
all_equal2(pi, 355/113, 22/7)
all_equal2(pi, 355/113, 22/7, tolerance = 0.01)
all_equal2(cars[1], cars[, 1, drop = FALSE], cars[, -2, drop = TRUE])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.