check_dups: Check for duplicates in a vector

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Check for duplicates in a vector

Usage

1
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

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

cmap/cmapR documentation built on Oct. 14, 2021, 12:51 a.m.