distinct.dtplyr_step {dtplyr} | R Documentation |
Subset distinct/unique rows
Description
This is a method for the dplyr distinct()
generic. It is translated to
data.table::unique.data.table()
.
Usage
## S3 method for class 'dtplyr_step'
distinct(.data, ..., .keep_all = FALSE)
Arguments
.data |
|
... |
< |
.keep_all |
If |
Examples
library(dplyr, warn.conflicts = FALSE)
df <- lazy_dt(data.frame(
x = sample(10, 100, replace = TRUE),
y = sample(10, 100, replace = TRUE)
))
df %>% distinct(x)
df %>% distinct(x, y)
df %>% distinct(x, .keep_all = TRUE)
[Package dtplyr version 1.3.1 Index]