Hi .. let's say I have this table
*X* *Y*01 a01 b01 c02 b02 g03 a03 g04 a04 b04 c
I want to create a logical binary matrix where the rows indicate to the unique values of X and the columns indicate the unique values of Y the output would be like this
a b c g 01 1 1 1 0 02 0 1 0 1 03 1 0 0 1 04 1 1 1 0
I have a large table and I want to find groups of Xs based on Ys. According to this example, I have 3 groups (01,04) (02) (03).
any help would be appreciated thank you
Best Answer