Check whether var is valid
assert_valid_var(x, label, na_ok, empty_ok, ...)# S3 method for character
assert_valid_var(
x,
label = deparse(substitute(x)),
na_ok = FALSE,
empty_ok = FALSE,
min_chars = 1L,
...
)
# S3 method for factor
assert_valid_var(
x,
label = deparse(substitute(x)),
na_ok = FALSE,
empty_ok = FALSE,
min_chars = 1L,
...
)
# S3 method for logical
assert_valid_var(
x,
label = deparse(substitute(x)),
na_ok = TRUE,
empty_ok = FALSE,
...
)
# S3 method for numeric
assert_valid_var(
x,
label = deparse(substitute(x)),
na_ok = TRUE,
empty_ok = FALSE,
integerish = FALSE,
...
)
# S3 method for POSIXct
assert_valid_var(
x,
label = deparse(substitute(x)),
na_ok = TRUE,
empty_ok = FALSE,
tzs = OlsonNames(),
...
)
# S3 method for default
assert_valid_var(
x,
label = deparse(substitute(x)),
na_ok = FALSE,
empty_ok = FALSE,
...
)
invisible NULL
or an error message if the criteria are not fulfilled.
value of col_split variable
(string
) hints.
(flag
) whether NA value is allowed
(flag
) whether length 0 value is allowed.
Further arguments to methods.
(integer
) the minimum length of the characters.
(flag
) whether the number should be treated as integerish
.
(character
) time zones.
This function checks the variable values are valid or not.