0

I have a data frame containing two columns - ID and SHOP, and I want to find the count of unique Customer IDs that correspond to unique combination of shops in the Shop column. My original data frame is as follows

CustomerID SHOP
1 A
2 A
3 B
1 C
2 D
4 E

The intended output should be as follows:

SHOP PAIR CUSTOMERS
A-C 1
A-D 1

Is there a smart way to achieve this in R? Thanks for the help!

stump
  • 85
  • 1
  • 6

0 Answers0