Like dplyr::distinct() but faster when lots of
groups are involved.
f_distinct(
data,
...,
.keep_all = FALSE,
sort = FALSE,
order = sort,
.by = NULL,
.cols = NULL
)A data.frame of distinct groups.
A data frame.
Variables used to find distinct rows.
If TRUE then all columns of data frame are kept,
default is FALSE.
Should result be sorted? Default is FALSE.
When order = FALSE this option has no effect on the result.
Should the groups be calculated as ordered groups?
Setting to TRUE may sometimes offer a speed benefit, but usually this
is not the case. The default is FALSE.
(Optional). A selection of columns to group by for this operation. Columns are specified using tidy-select.
(Optional) alternative to ... that accepts
a named character vector or numeric vector.
If speed is an expensive resource, it is recommended to use this.