Learn R Programming

keyed (version 0.1.3)

find_duplicates: Find duplicate keys

Description

Identifies rows with duplicate key values.

Usage

find_duplicates(.data, ...)

Value

Data frame containing only the rows with duplicate keys, with a .n column showing the count.

Arguments

.data

A data frame.

...

Column names to check. If empty, uses the key columns.

Examples

Run this code
df <- data.frame(id = c(1, 1, 2, 3, 3, 3), x = letters[1:6])
find_duplicates(df, id)

Run the code above in your browser using DataLab