I have two columns x and y. Each contains only 8 values. These are numerical but are descriptive (nominal). I want to get an 8×8 matrix with the count of how many times a particular set happened.
For background info x and y are origins and destinations. Each row is a shipment and I need to know how many shipments between the origin and destination.
Small example (2×2):
x = a a a a b b b b b by = a a a b b b b a a aM = [3 2;3 2]
Best Answer