Checks the provided x is a scalar string via rlang::check_string().
Usage
check_string(
x,
allow_empty = FALSE,
allow_na = FALSE,
allow_null = FALSE,
arg = rlang::caller_arg(x),
call = rlang::caller_env()
)Arguments
- x
The argument to check.
- allow_empty
Whether the empty string
""is allowed (check_string()only).- allow_na
Whether
NAvalues are allowed.- allow_null
Whether
NULLis allowed.- arg
An argument name as a string. This argument will be mentioned in error messages as the input that is at the origin of a problem.
- call
The execution environment of a currently running function, e.g.
caller_env(). The function will be mentioned in error messages as the source of the error. See thecallargument ofabort()for more information.
