R/check-scalar-hasDuplicates.R
check-scalar-hasDuplicates.Rd
Does the input have duplicates?
hasDuplicates(x) hasNoDuplicates(x)
Object.
TRUE on success; FALSE on failure, with cause set.
TRUE
FALSE
Updated 2023-01-12.
assertive.properties::has_duplicates().
assertive.properties::has_duplicates()
assertive.properties::has_no_duplicates().
assertive.properties::has_no_duplicates()
## TRUE ==== hasDuplicates(c("a", "a")) #> [1] TRUE hasNoDuplicates(c("a", "b")) #> [1] TRUE ## FALSE ==== hasDuplicates(c("a", "b")) #> [1] FALSE hasNoDuplicates(c("a", "a", "b", "b")) #> [1] FALSE