is_vector | R Documentation |
Checks if the passed entity is a vector. Note that in R single values are also vectors.
is_vector(value, exact_length = NULL, min_length = NULL, max_length = NULL)
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 |
## Not run:
# For assertion
assertthat::assert_that(qscheck::is_vector(my_parameter))
# For check
if (qscheck::is_vector(my_parameter)) {}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.