I am trying to do Market Basket Analysis with R and run into a problem. I use .csv file, where are two columns "Product" and "Customer". Customer number is repeated as many times as he purchased different products. The table looks like that:
Product Customer
114 1
112 2
112 1
113 4
115 3
113 2
111 2
113 3
And I need to make it like this: (two columns: customer, products. For every customer all the products he bought in one cell).
Customer Products
1 114, 112
2 112, 113, 111
3 115, 113
4 113
What should I do?
Any help would be great!