Skip to contents

This function checks for duplicate rows in a data frame.

Usage

check_duplicate_rows(.data)

Arguments

.data

A data frame.

Value

A logical vector indicating whether each row is a duplicate or not.

Details

This function checks for duplicate rows by comparing each row in the data frame to every other row. If a row is identical to another row, it is considered a duplicate.

Author

Steven P. Sanderson II, MPH

Examples

data <- data.frame(
  x = c(1, 2, 3, 1),
  y = c(2, 3, 4, 2),
  z = c(3, 2, 5, 3)
)

check_duplicate_rows(data)
#> [1] FALSE  TRUE FALSE FALSE