Learn R Programming

litteR (version 1.0.0)

list_duplicates: List Duplicates

Description

Lists all duplicates as a list of tuples.

Usage

list_duplicates(x, ...)

# S3 method for character list_duplicates(x, ...)

# S3 method for tbl list_duplicates(x, ...)

# S3 method for data.frame list_duplicates(x, ...)

Value

list of row numbers with duplicates

Arguments

x

object of class character, tibble or data.frame)

...

further arguments passed to or from other methods.

Methods (by class)

  • list_duplicates(character): list duplicates for a character vector.

  • list_duplicates(tbl): lists duplicates for a tibble.

  • list_duplicates(data.frame): lists duplicates for a data.frame.

Examples

Run this code
list_duplicates(c("a", "b", "c")) # list()
list_duplicates(c("a", "b", "a", "c")) # list(c(1, 3))

Run the code above in your browser using DataLab