Skip to contents

This function checks that the elements of a vector are not repeated.

Usage

assert_no_repeated_elements(
  x,
  arg = "x",
  call = rlang::caller_env(),
  add_err_msg = ""
)

Arguments

x

the vector to check

arg

the name of the vector to check

call

Calling environment to be passed to cli::cli_abort() for traceback.

add_err_msg

string containing an additional error message, default is the empty string ("")

Value

NULL, invisibly