cross_list | R Documentation |
List all combinations of values
cross_list(...) cross_tbl(...)
... |
Inputs or a list of inputs.
|
A list for cross_list()
or tibble for
cross_tbl()
.
Names will match the names of the inputs.
Unnamed inputs will be left unnamed for cross_list()
and automatically
named for cross_tbl()
.
cross_join()
to find combinations of data frame rows.
purrr::cross()
for an implementation that results in a differently
formatted list.
expand.grid()
for an implementation that results in a data.frame.
fruits <- c("apple", "banana", "cantaloupe") desserts <- c("cupcake", "muffin", "streudel") cross_list(list(fruits, desserts)) cross_list(fruits, desserts) cross_tbl(fruits, desserts) cross_list(list(fruit = fruits, dessert = desserts)) cross_list(fruit = fruits, dessert = desserts) cross_tbl(fruit = fruits, dessert = desserts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.