Test whether all values in a vector are equal.

test_all_equal(x, na.rm = FALSE)

Arguments

x

Vector to test.

na.rm

default: FALSE. exclude NAs from the test.

Value

Boolean result of the test

Examples

test_all_equal(c(5, 5, 5))
#> [1] TRUE

test_all_equal(c(5, 6, 3))
#> [1] FALSE