I\'m trying to find the dplyr function for cartesian product. I\'ve two simple data.frame with no common variable:
x <- data.frame(x=c(\"a\",\"b\",\"c\"))
expand.grid(x=c("a","b","c"),y=c(1,2,3))
Edit: Consider also this following elegant solution from "Y T" for n more complex data.frame :
https://stackoverflow.com/a/21911221/5350791
in short:
expand.grid.df <- function(...) Reduce(function(...) merge(..., by=NULL), list(...))
expand.grid.df(df1, df2, df3)