Actually a wrapper for expand.grid
, but
character vectors will stay as characters.
expand_tibble(...)
... | vectors, factors or a list containing these. |
---|
See expand.grid
but instead of a
data.frame
a tibble
is returned.
Marsel Scheer
expand_tibble(fun = "rnorm", mean = 1:4, sd = 2:5)#> # A tibble: 16 × 3 #> fun mean sd #> <chr> <int> <int> #> 1 rnorm 1 2 #> 2 rnorm 2 2 #> 3 rnorm 3 2 #> 4 rnorm 4 2 #> 5 rnorm 1 3 #> 6 rnorm 2 3 #> 7 rnorm 3 3 #> 8 rnorm 4 3 #> 9 rnorm 1 4 #> 10 rnorm 2 4 #> 11 rnorm 3 4 #> 12 rnorm 4 4 #> 13 rnorm 1 5 #> 14 rnorm 2 5 #> 15 rnorm 3 5 #> 16 rnorm 4 5