I know expand.grid is to create all combinations of given vectors. But is there a way to generate all combinations of a data frame and a vector by taking each r
expand.grid
As for me the simplest way is merge(df, as.data.frame(c))
merge(df, as.data.frame(c))
a b c 1 1 5 9 2 2 6 9 3 3 7 9 4 1 5 10 5 2 6 10 6 3 7 10