powered by
Test if all items in a vector or a list are identical.
all_identical(x)
TRUE if all elements of x are identical to each other.
TRUE
x
a vector or a list
identical
stopifnot(!all_identical(1:3)) stopifnot(all_identical(list("a", "a", "a")))
Run the code above in your browser using DataLab