Learn R Programming

statar (version 0.2)

find_duplicates: returns a data.frame with duplicated rows

Description

returns a data.frame with duplicated rows

Usage

find_duplicates(x, ..., gen = "N")

find_duplicates_(x, vars, gen = "N")

Arguments

x
a data.frame
...
Variable on which one should check for duplicates. Default to all variables
gen
A character that specifies the name of a new variable with the number of duplicates. Default to "N".
vars
Used to work around non-standard evaluation.

Value

  • a data.frame with groups that have duplicates.

Examples

Run this code
df <- data.frame(a = rep(1:2, each = 3), b = 1:6)
find_duplicates(df, a)

Run the code above in your browser using DataLab