I have the following data frame:
data.frame(col_1 = c("a", "b", "c"),
col_2 = c(1, 2, 3))
I would like to make all values from the col_1 have correpondences with all the values from col_2.
The expected result would be like this:
data.frame(col_1 = c("a", "a", "a", "b", "b", "b", "c", "c", "c"),
col_2 = c(1, 2, 3, 1, 2, 3, 1, 2, 3))
I have tried with spread and reshape but it did not work.