I have a large dataset that tells me which products each customer purchases. I want to know the most common combinations of products that customers purchase. So, it would return say, "27 customers purchase bananas and oranges", "45 customers purchase oranges and apples". Any idea how I would handle these combination counts in R?
Edit:
df would look like this:
Customer Product
A Banana
A Orange
A Apple
B Banana
B Orange
B Apple
C Banana
C Orange
C Apple
C Peach
C Pear
C Plum
I would want it to return:
Customers With this combo Product Count Products Taken
2 3 Banana, Orange, Apple
1 5 Banana, Orange, Apple, Peach, Pear, Plum