Skip to contents

# Check for Duplicate Rows in a Data Frame

Source: `R/utils-check-dupe-rows.R`
`check_duplicate_rows.Rd`

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.

## See also

`duplicated`, `anyDuplicated`

Other Utility: `convert_to_ts()`, `quantile_normalize()`

## 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