check_dups {cmapR} | R Documentation |
Check for duplicates in a vector
check_dups(x, name = "")
x |
the vector |
name |
the name of the object to print in an error message if duplicates are found |
silently returns NULL
# this will throw an erorr, let's catch it tryCatch( check_dups(c("a", "b", "c", "a", "d")), error=function(e) print(e) )