distinct.duckplyr_df {duckplyr} | R Documentation |
Keep distinct/unique rows
Description
This is a method for the dplyr::distinct()
generic.
Keep only unique/distinct rows from a data frame.
This is similar to unique.data.frame()
but considerably faster.
Usage
## S3 method for class 'duckplyr_df'
distinct(.data, ..., .keep_all = FALSE)
Arguments
.data |
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details. |
... |
< |
.keep_all |
If |
See Also
Examples
df <- duckdb_tibble(
x = sample(10, 100, rep = TRUE),
y = sample(10, 100, rep = TRUE)
)
nrow(df)
nrow(distinct(df))
[Package duckplyr version 1.1.0 Index]