I have a dataframe (df) like this
name col1 col2
pippo A;B;C E;F;G;
pluto G;H X;Y;Z;E;O;D
I'd like to write all possible combinations between 1 element of col1 and 1 element of col 2 and for each returned as a dataframe, for example
name col1 col2
pippo A E
pippo A F
pippo A G
pippo B E
... and so on.
Considering that I have all alphabet letters and the number of elements in col1 and col2 can variate (from 1 element to 10), is it possible with R?