check_dups {cmapR} | R Documentation

## Check for duplicates in a vector

### Description

Check for duplicates in a vector

### Usage

    check_dups(x, name = "")

### Arguments

`x` | the vector
`name` | the name of the object to print in an error message if duplicates are found

### Value

silently returns NULL

### Examples

    # this will throw an erorr, let's catch it
    tryCatch(
      check_dups(c("a", "b", "c", "a", "d")),
      error=function(e) print(e)
      )

[Package cmapR version 1.2.1 Index]