Check whether a vector, x, has all its entries equal to its first entry

check_identical(x)

Arguments

x

a vector

Value

a logical indicating whether all vector entries are the same

Examples

x <- 1:5 check_identical(x)
#> [1] FALSE
y <- rep(1, 5) check_identical(y)
#> [1] TRUE