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,
.sort = FALSE,
.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 |
.sort |
Should result be sorted?
If |
.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.