Skip to contents

The difference here to duplicated() is that also the first occurrence of a duplicate is flagged as TRUE.

Usage

h_all_duplicated(x)

Arguments

x

a (generalized, see is.vector) vector, a data frame, an array or NULL.

Value

Logical vector flagging all occurrences of duplicate values as TRUE.

Examples

h_all_duplicated(c("a", "a", "b"))
#> [1]  TRUE  TRUE FALSE
duplicated(c("a", "a", "b"))
#> [1] FALSE  TRUE FALSE