are_equal: Are two objects equal?

Description Usage Arguments See Also Examples

Description

Are two objects equal?

Usage

1
are_equal(x, y, ...)

Arguments

x, y

objects to compare

...

additional arguments passed to all.equal

See Also

Other assertions: is.error, is.scalar, noNA, not_empty

Examples

1
2
3
4
x <- 2
see_if(are_equal(x, 1.9))
see_if(are_equal(x, 1.999, tol = 0.01))
see_if(are_equal(x, 2))

Example output

[1] FALSE
attr(,"msg")
[1] "x not equal to 1.9"
[1] TRUE
[1] TRUE

assertthat documentation built on May 1, 2019, 10:25 p.m.