Distinct - dsofe/coderr GitHub Wiki
distinct
.keep all
df <- tibble(
x = sample(10, 100, rep = TRUE),
y = sample(10, 100, rep = TRUE)
)
# both vars retained
xt <- distinct(df, x, .keep_all = TRUE)
# only `x` var retained
xf <- distinct(df, x, .keep_all = FALSE)