Skip to contents

Check if all values in a vector are distinct

Usage

is_all_distinct(x)

Arguments

x

A vector

Value

TRUE if the vector has all unique values

Examples

is_all_distinct(c(1:5)) # TRUE
#> [1] TRUE
is_all_distinct(c(1, 1, 2)) # FALSE
#> [1] FALSE