| find_dupes | R Documentation |
Identify duplicate cases in a data frame or tibble based on specific variables. A logical column 'has_dupes' is added, that indicates whether or not a row has duplicate values based on the provided variables.
find_dupes(data, ...)
data |
A data frame or tibble |
... |
Variable names to check for duplicates |
The original data frame or tibble with an additional logical column 'has_dupes' which is 'TRUE' for rows that have duplicates based on the specified variables and 'FALSE' otherwise.
# Example data
print(sailor_students)
# Find duplicate cases based on 'sgic', 'school' and 'class'
sailor_students_dupes <- find_dupes(sailor_students, sgic, school, class)
# Rows where 'has_dupes' is `TRUE` indicate duplicates based on the provided columns
print(sailor_students_dupes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.