has_duplicates: Does the input have duplicates?

Description Usage Arguments Value See Also Examples

View source: R/has-dupes.R

Description

Checks to see if the input has duplicates.

Usage

1
2
3
4
5
6
7
8
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))

Arguments

x

Input to check.

severity

How severe should the consequences of the assertion be? Either "stop", "warning", "message", or "none".

.xname

Not intended to be used directly.

Value

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.

See Also

anyDuplicated.

Examples

1
2
3


assertive.properties documentation built on May 19, 2017, 4:09 p.m.
Search within the assertive.properties package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.