f_distinct: Find distinct rows

View source: R/f_distinct.R

f_distinctR Documentation

Find distinct rows

Description

Like dplyr::distinct() but faster when lots of groups are involved.

Usage

f_distinct(
  data,
  ...,
  .keep_all = FALSE,
  .order = FALSE,
  .sort = deprecated(),
  .by = NULL,
  .cols = NULL
)

Arguments

data

A data frame.

...

Variables used to find distinct rows.

.keep_all

If TRUE then all columns of data frame are kept, default is FALSE.

.order

Should the groups be calculated as ordered groups? Setting to TRUE here implies that the groups are returned sorted.

.sort

[Deprecated] Use .order instead.

.by

(Optional). A selection of columns to group by for this operation. Columns are specified using tidy-select.

.cols

(Optional) alternative to ... that accepts a named character vector or numeric vector. If speed is an expensive resource, it is recommended to use this.

Value

A data.frame of distinct groups.


fastplyr documentation built on June 8, 2025, 11:18 a.m.