Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upExpand data frame for all combinations of values for all variables without explicitly specifying variables names #704
Comments
This comment has been minimized.
This comment has been minimized.
You can use In the future, we'll support |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I posted the following question on Twitter:
@hadley asked if I would file an issue so he could think about it some more.
I suppose the Tweet is self-explanatory, I want to be able to expand a data frame for all possible combinations of values for every variable, without having to specify variable names explicitly.
This works:
This doesn't:
Of course, in the two variable setting, explicitly typing
tibble(x = 1:3, y = 1:3) %>% expand(x, y)
is not a problem, but it doesn't scale well.Something like this might be a possible solution: