assert_valid_var | R Documentation |
Check whether var is valid
assert_valid_var(x, label, na_ok, empty_ok, ...)
## S3 method for class 'character'
assert_valid_var(
x,
label = deparse(substitute(x)),
na_ok = FALSE,
empty_ok = FALSE,
min_chars = 1L,
...
)
## S3 method for class 'factor'
assert_valid_var(
x,
label = deparse(substitute(x)),
na_ok = FALSE,
empty_ok = FALSE,
min_chars = 1L,
...
)
## S3 method for class 'logical'
assert_valid_var(
x,
label = deparse(substitute(x)),
na_ok = TRUE,
empty_ok = FALSE,
...
)
## S3 method for class 'numeric'
assert_valid_var(
x,
label = deparse(substitute(x)),
na_ok = TRUE,
empty_ok = FALSE,
integerish = FALSE,
...
)
## S3 method for class 'POSIXct'
assert_valid_var(
x,
label = deparse(substitute(x)),
na_ok = TRUE,
empty_ok = FALSE,
tzs = OlsonNames(),
...
)
## Default S3 method:
assert_valid_var(
x,
label = deparse(substitute(x)),
na_ok = FALSE,
empty_ok = FALSE,
...
)
x |
value of col_split variable |
label |
( |
na_ok |
( |
empty_ok |
( |
... |
Further arguments to methods. |
min_chars |
( |
integerish |
( |
tzs |
( |
This function checks the variable values are valid or not.
invisible NULL
or an error message if the criteria are not fulfilled.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.