list_duplicates: List Duplicates

View source: R/utils.R

list_duplicatesR Documentation

List Duplicates

Description

Lists all duplicates as a list of tuples.

Usage

list_duplicates(x, ...)

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

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

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

Arguments

x

object of class character, tibble or data.frame)

...

further arguments passed to or from other methods.

Value

list of row numbers with duplicates

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

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

litteR documentation built on Aug. 27, 2022, 1:05 a.m.