i have the following dataframe,
id food drink
1 chip coke, wine, punch
2 eggs pepsi, water
3 pie water, wine, orange juice
I want to know how i can get the following dataframe instead:
id food drink
1 chip coke
1 chip wine
1 chip punch
2 eggs pepsi
2 eggs water
3 pie water
3 pie wine
3 pie orange juice
i would like to use something from the tidyverse such as the stringr pacakge - but am stuck at the moment
any ideas how to do this in R?