expand_list: Create a list from all combinations of arguments
Description
Create a list from all combinations of the supplied vectors or lists.
Usage
expand_list(...)
Value
A list containing one element for each combination of the supplied vectors
and lists. The first factors vary fastest.
The nested elements are labeled by the factors.
The function allows list elements to be vectors, functions, or NULL.
If a vector element is supposed to be kept as a vector, use list().
b <- expand_list(
movement = c(0, 1, 2),
rint = list(c(0.5, 1, 1.5, Inf)), # in a list to keep as one xy_fun = list(NULL, function(z) z))
b[[1]]
str(b)