Check Character Scalar
Checks if character scalar using
is.character(x) && length(x) == 1L
chk_chr(x, x_name = NULL) vld_chr(x)
x |
The object to check. |
x_name |
A string of the name of object x or NULL. |
The chk_
function throws an informative error if the test fails.
The vld_
function returns a flag indicating whether the test was met.
vld_chr
: Validate Character Scalar
chk_chr("a") try(chk_chr(1)) # vld_chr vld_chr("") vld_chr("a") vld_chr(NA_character_) vld_chr(c("a", "b")) vld_chr(1)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.