Description Usage Arguments Value See Also Examples
Checks whether an object is a list and optionally the names and values of its elements.
1 2 3 |
x |
The object to check. |
values |
An optional vector or named list specifying the values. |
length |
A flag indicating whether x should have elements (versus no elements) or a missing value indicating no requirements or a count or count range of the number of elements or a count vector of the permitted number of elements. |
unique |
A flag indicating whether the values must be unique. |
named |
A flag indicating whether the list must be named or unnamed or a regular expression that must match all the names or count or count range of the number of characters in the names or NA if it doesn't matter if the list is named. |
exclusive |
A flag indicating whether other elements are not permitted. |
order |
A flag indicating whether the elements have to occur in the same order as values. |
x_name |
A string of the name of the object. |
error |
A flag indicating whether to throw an informative error or immediately generate an informative message if the check fails. |
An invisible copy of x (if it doesn't throw an error).
1 2 | check_list(list())
check_list(list(x1 = 2, x2 = 1:2), values = list(x1 = 1, x2 = 1L))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.