| flag_dupes {campfin} | R Documentation |
Flag Duplicate Rows With New Column
Description
This function uses dplyr::mutate() to create a new dupe_flag logical
variable with TRUE values for any record duplicated more than once.
Usage
flag_dupes(data, ..., .check = TRUE, .both = TRUE)
Arguments
data |
A data frame to flag. |
... |
Arguments passed to |
.check |
Whether the resulting column should be summed and removed if empty. |
.both |
Whether to flag both duplicates or just subsequent. |
Value
A data frame with a new dupe_flag logical variable.
Examples
flag_dupes(iris, dplyr::everything())
flag_dupes(iris, dplyr::everything(), .both = FALSE)
[Package campfin version 1.0.11 Index]