Learn R Programming

oeli (version 0.7.1)

check_list_of_lists: Check list of lists

Description

These functions check whether the input is a list that contains list elements.

Usage

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)

Value

Same as documented in check_list.

Arguments

x

[any]
Object to check.

len

[integer(1)]
Exact expected length of x.

.var.name

[character(1)]
Name of the checked object to print in assertions. Defaults to the heuristic implemented in vname.

add

[AssertCollection]
Collection to store assertion messages. See AssertCollection.

See Also

Other list helpers: merge_lists()

Examples

Run this code
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