is_list | R Documentation |
Check if the passed entity is a list.
is_list(l, required_names = NULL, exact_length = NULL, allow_null = FALSE)
l |
the value to check |
required_names |
vector of strings. If passed, checks if the list contains *at least* the specified elements. |
exact_length |
integer value. If passed, the list must have the *exact* specified length |
allow_null |
if TRUE, NULL is accepted as a valid value. If FALSE (default) do not accept it. |
Note that a list with names set to NULL are considered not to be present. This is an R detail, not a qscheck detail.
## Not run:
# For assertion
assertthat::assert_that(qscheck::is_list(my_parameter))
# For check
if (qscheck::is_list(my_parameter)) {}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.