f_duplicates {fastplyr} | R Documentation |
Find duplicate rows
Description
Find duplicate rows
Usage
f_duplicates(
data,
...,
.keep_all = FALSE,
.both_ways = FALSE,
.add_count = FALSE,
.drop_empty = FALSE,
.order = FALSE,
.sort = deprecated(),
.by = NULL,
.cols = NULL
)
Arguments
data |
A data frame. |
... |
Variables used to find duplicate rows. |
.keep_all |
If |
.both_ways |
If |
.add_count |
If |
.drop_empty |
If |
.order |
Should the groups be calculated as ordered groups?
Setting to |
.sort |
|
.by |
(Optional). A selection of columns to group by for this operation. Columns are specified using tidy-select. |
.cols |
(Optional) alternative to |
Details
This function works like dplyr::distinct()
in its handling of
arguments and data-masking but returns duplicate rows.
In certain situations in can be much faster than data |> group_by()|> filter(n() > 1)
when there are many groups.
Value
A data.frame
of duplicate rows.