View source: R/get_all_dupes.R
all_dupes | R Documentation |
Identifies the duplicate values in a column of a data frame (or tibble) and returns a data frame (tibble) with just the duplicate rows.
I actually prefer janitor::get_dupes()
but I am including this version
for posterity.
all_dupes(data, x)
data |
A data frame or tibble |
x |
The unquoted column name to check for duplicate values |
A tibble similar to data
https://stat.ethz.ch/pipermail/r-help/2011-October/291383.html
library(dplyr)
library(tibble)
vec <- tibble::tribble(
~ID, ~OS, ~Date,
"userA", "Win", "12/15/2015",
"userB", "OSX", "1/1/2016",
"userA", "Win", "12/15/2017",
"userC", "Win64", "4/9/2018"
)
all_dupes(data = vec, x = ID)
vec %>%
all_dupes(ID)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.