Description Usage Arguments Value See Also Examples
Analogous function for distinct
in dplyr
1 | distinct_dt(data, ..., .keep_all = FALSE)
|
data |
data.frame |
... |
Optional variables to use when determining uniqueness. If there are multiple rows for a given combination of inputs, only the first row will be preserved. If omitted, will use all variables. |
.keep_all |
If |
data.table
1 2 3 4 5 | iris %>% distinct_dt()
iris %>% distinct_dt(Species)
iris %>% distinct_dt(Species,.keep_all = TRUE)
mtcars %>% distinct_dt(cyl,vs)
mtcars %>% distinct_dt(cyl,vs,.keep_all = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.