Determine duplicates. duplicates returns a logical vector,
duplicatei an integer vector.
Usage
duplicates(x)
duplicatei(x, first = TRUE)
Arguments
x
A vector or data.frame to search for duplicates.
first
Logical, TRUE to return the index also for the first
occurrence of values. Otherwise, a 0 is the index for the first
occurrence.
Value
duplicates returns a logical vector as duplicated, but with
TRUE values also for the first occurrence of duplicated values.
duplicatei returns the index of the first occurrence of each unique
value.