Learn R Programming

assertive (version 0.3-0)

are_identical: Are the inputs identical

Description

Generalisation of identical to an arbitrary number of inputs.

Usage

are_identical(...)

assert_all_are_identical(...)

assert_any_are_identical(...)

Arguments

...
Some R expressions

Value

  • A symmetric square logical matrix which is TRUE where pairs of inputs are identical.

See Also

identical, are_same_length

Examples

Run this code
x <- 1:5
are_identical(cos(pi), -1, x, (2:6) - 1L)
assert_any_are_identical(cos(pi), -1, x, (2:6) - 1L)
dont_stop(assert_all_are_identical(cos(pi), -1, x, (2:6) - 1L))

Run the code above in your browser using DataLab