Get all combinations from a dataframe column

tidy_comb_all(data, ...)

# S3 method for data.frame
tidy_comb_all(data, ...)

# S3 method for default
tidy_comb_all(data, ...)

Arguments

data

a list or a data.frame with the elements to combine

...

if data is a data.frame, the col where the words to combine are

Value

a tibble with all possible combination of elements from a list

Examples

tidy_comb_all(iris, Species)
#> # A tibble: 3 x 2 #> V1 V2 #> * <chr> <chr> #> 1 setosa versicolor #> 2 setosa virginica #> 3 versicolor virginica
tidy_comb_all(state.name)
#> # A tibble: 1,225 x 2 #> V1 V2 #> * <chr> <chr> #> 1 Alabama Alaska #> 2 Alabama Arizona #> 3 Alabama Arkansas #> 4 Alabama California #> 5 Alabama Colorado #> 6 Alabama Connecticut #> 7 Alabama Delaware #> 8 Alabama Florida #> 9 Alabama Georgia #> 10 Alabama Hawaii #> # ... with 1,215 more rows