Skip to content

Commit

Permalink
Fix assert_unique()
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau committed Jan 16, 2023
1 parent d43f43f commit e5805ac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Expand Up @@ -4,6 +4,7 @@

## Bugfixes & changes
* Remove deprecated methods.
* Remove unused argument in `assert_unique()`.

# arkhe 1.0.0
## New classes and methods
Expand Down
3 changes: 1 addition & 2 deletions R/assert.R
Expand Up @@ -257,7 +257,6 @@ assert_colnames <- function(x, expected) {
#' missing (`NA`, `NaN`) or infinite (`Inf`) value.
#' * `assert_unique()` checks if an object contains duplicated elements.
#' @param x An object to be checked.
#' @param expected An appropriate expected value.
#' @return
#' Throws an error, if any, and returns `x` invisibly otherwise.
#' @author N. Frerebeau
Expand Down Expand Up @@ -294,7 +293,7 @@ assert_infinite <- function(x) {

#' @export
#' @rdname check-data
assert_unique <- function(x, expected) {
assert_unique <- function(x) {
arg <- deparse(substitute(x))
if (has_duplicates(x)) {
msg <- sprintf("Elements of %s must be unique.", sQuote(arg))
Expand Down
4 changes: 1 addition & 3 deletions man/check-data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e5805ac

Please sign in to comment.