Test if all items in a vector or a list are identical.
Test if all items in a vector or a list are identical.
all_identical(x)
x |
a vector or a list |
TRUE if all elements of x are identical to each other.
stopifnot(!all_identical(1:3))
stopifnot(all_identical(list("a", "a", "a")))Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.