powered by
This function uses dplyr::mutate() to create a new dupe_flag logical variable with TRUE values for any record duplicated more than once.
dplyr::mutate()
dupe_flag
TRUE
flag_dupes(data, ..., .check = TRUE, .both = TRUE)
A data frame with a new dupe_flag logical variable.
A data frame to flag.
Arguments passed to dplyr::select() (needs to be at least dplyr::everything()).
dplyr::select()
dplyr::everything()
Whether the resulting column should be summed and removed if empty.
Whether to flag both duplicates or just subsequent.
flag_dupes(iris, dplyr::everything()) flag_dupes(iris, dplyr::everything(), .both = FALSE)
Run the code above in your browser using DataLab