multiplyr (version 0.1.1)

distinct: Select unique rows or unique combinations of variables

Description

Select unique rows or unique combinations of variables

Usage

distinct(.self, ..., auto_compact = NULL)
distinct_(.self, ..., .dots, auto_compact = NULL)

Arguments

.self
Data frame
...
Additional parameters
auto_compact
Compact data after operation
.dots
Workaround for non-standard evaluation

Value

Data frame

Details

When called with no additional parameters, distinct(), this function will filter out any non-unique rows in the specified data frame. Specifying column names will limit the uniqueness checks to only those columns, i.e. distinct(G) will limit the data frame to only have unique values of G.

Note that if data are grouped, then this will find unique rows or combinations for each group.

See Also

Other row manipulations: arrange, filter, group_by, slice

Examples

Run this code

dat <- Multiplyr (x=1:100, G=rep(c("A", "B", "C", "D"), each=25))
dat %>% distinct(G)
dat %>% shutdown()

Run the code above in your browser using DataCamp Workspace