Skip to contents

Check if all elements in a list are identical.

Usage

are_all_elements_identical(x)

Arguments

x

List to be checked.

Value

TRUE if all elements are identical, otherwise FALSE.

Examples

list_non_identik <- list(1, 2, 3, 4)
are_all_elements_identical(list_non_identik)
#> [1] FALSE
list_identik <- list(1, 1, 1, 1)
are_all_elements_identical(list_identik)
#> [1] TRUE