Skip to contents

For every element/row of x that has at least one duplicate, return one instance of that element.

Usage

dupes(x, ...)

Arguments

x

an atomic vector or data.frame

...

passed on to duplicated()

Examples

dupes(c(1, 1, 1, 2))
#> [1] 1
dupes(cars[c(1, 1, 1, 2), ])
#>   speed dist
#> 1     4    2