You can distinct the all columns with the code below.
library(dplyr)
library(data.table)
df <- data_frame(
id = c(1, 1, 2, 2, 3, 3),
value = c("a", "a", "b", "c", "d", "d")
)
# A tibble: 6 × 2
# id value
# <dbl> <chr>
# 1 1 a
# 2 1 a
# 3 2 b
# 4 2 c
# 5 3 d
# 6 3 d
# distinct with Non-Standard Evaluation
df %>% distinct()
# distinct with Standard Evaluation
df %>% distinct_()
# Also, you can set the column names with .dots.
df %>% distinct_(.dots = names(.))
# A tibble: 4 × 2
# id value
# <dbl> <chr>
# 1 1 a
# 2 2 b
# 3 2 c
# 4 3 d
# distinct with data.table
unique(as.data.table(df))
# id value
# 1: 1 a
# 2: 2 b
# 3: 2 c
# 4: 3 d