duplicates: Report, tag or drop the duplicate observations
Description
duplicates() generates a table showing the
duplicate Observations as one or more copies as well as
their Surplus indicating the second, third, ... copy of
the first of each group of duplicates.
Usage
duplicates(data, ..., drop = FALSE)
Arguments
data
data.frame
...
variables to find the duplicate observations
drop
TRUE deletes all the duplicate observations.
Value
data.frame with a column dup_num, indicating the number of duplicate
observations of each group of observations
Details
If no variable is specified in ..., all variables are used
to find the duplicate observations.
If drop is set to TRUE, all occurrences of each group
of observations except the first are deleted from the
dataset.