Assert that an object is a character and fulfill certain conditions.
assertCharacter(
x,
length = NULL,
na = FALSE,
null = FALSE,
unique = FALSE,
named = FALSE,
minNumCharacter = 0,
call = parent.frame(),
msg = NULL
)
Variable to check.
Required length. If NULL
length is not checked.
Whether it can contain NA values.
Whether it can be NULL.
Whether it has to contain unique elements.
Whether it has to be named.
Minimum number of characters that all elements must have.
Call argument that will be passed to cli
error message.
Custom error message.