expand_list() returns one named list for each combination of the values
of its arguments. It works like tidyr::expand_grid(), but it returns a list
of lists, which Plan$add_argset_from_list() and
Plan$add_analysis_from_list() take.
See also
vignette("adding_analyses"), which builds argsets with
expand_list().
Other plan helpers:
Plan,
get_anything(),
is_run_directly(),
set_opts()
Examples
argsets <- plnr::expand_list(location = c("oslo", "bergen"), age = c("0-14", "15+"))
str(argsets)
#> List of 4
#> $ :List of 2
#> ..$ location: chr "oslo"
#> ..$ age : chr "0-14"
#> $ :List of 2
#> ..$ location: chr "oslo"
#> ..$ age : chr "15+"
#> $ :List of 2
#> ..$ location: chr "bergen"
#> ..$ age : chr "0-14"
#> $ :List of 2
#> ..$ location: chr "bergen"
#> ..$ age : chr "15+"
