| assert_has_duplicates | R Documentation |
Checks to see if the input has duplicates.
assert_has_duplicates(x, severity = getOption("assertive.severity", "stop"))
assert_has_no_duplicates(x, severity = getOption("assertive.severity", "stop"))
has_duplicates(x, .xname = get_name_in_parent(x))
has_no_duplicates(x, .xname = get_name_in_parent(x))
x |
Input to check. |
severity |
How severe should the consequences of the assertion be?
Either |
.xname |
Not intended to be used directly. |
has_duplicates returns TRUE ifanyDuplicated
is TRUE. assert_has_duplicates returns nothing but
throws an error if has_duplicates is not TRUE.
has_no_duplicates is the negation of has_duplicates.
anyDuplicated.
x <- sample(10, 100, replace = TRUE) assert_has_duplicates(x) has_no_duplicates(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.