powered by
These functions check whether the input is a list that contains list elements.
check_list_of_lists(x, len = NULL)assert_list_of_lists( x, len = NULL, .var.name = checkmate::vname(x), add = NULL )test_list_of_lists(x, len = NULL)
assert_list_of_lists( x, len = NULL, .var.name = checkmate::vname(x), add = NULL )
test_list_of_lists(x, len = NULL)
Same as documented in check_list.
check_list
[any] Object to check.
[integer(1)] Exact expected length of x.
integer(1)
x
[character(1)] Name of the checked object to print in assertions. Defaults to the heuristic implemented in vname.
character(1)
vname
[AssertCollection] Collection to store assertion messages. See AssertCollection.
AssertCollection
Other list helpers: merge_lists()
merge_lists()
L <- list(list(1), list(2), 3) check_list_of_lists(L) test_list_of_lists(L) if (FALSE) { assert_list_of_lists(L) }
Run the code above in your browser using DataLab