View source: R/string_vector.R
is_string_vector | R Documentation |
Checks if the passed entity is a vector of strings (character). Note that in R single values are also vectors.
is_string_vector(
value,
exact_length = NULL,
min_length = NULL,
max_length = NULL,
allow_na_values = FALSE,
allow_null = FALSE
)
value |
The value to check |
exact_length |
integer. If passed, checks if the vector is of the *exact* specified length. |
min_length |
integer. If passed, checks if the vector length is at least the specified length, inclusive. Note: if exact_length is specified, this parameter is ignored |
max_length |
integer. If passed, checks if the vector length is at most the specified length, inclusive Note: if exact_length is specified, this parameter is ignored |
allow_na_values |
boolean. If passed allows vectors containing NAs. The length check is performed including the NA values. Default FALSE. |
allow_null |
boolean. If TRUE, also accepts a value of NULL. Default FALSE. |
## Not run:
# For assertion
assertthat::assert_that(qscheck::is_string_vector(my_parameter))
# For check
if (qscheck::is_string_vector(my_parameter)) {}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.