I have a dataset with columns like Order ID, Productname and others
Order ID. Productname
121. Shirt
122. Tie
121. Socks
122. Belt
122. Shirt
I want the data to be shaped like below to perform the Market Basket Analysis in R
Order Id. Productname
121 Shirt,Socks
122. Tie,Belt,Shirt
I have come across different ways of doing it some using aggregate function or summarize function.But I am not able to get the output
Please share what functions or method to do this
THANKS IN ADVANCE
An option with
base R