I have table A with 2 columns of IDs. Each row represents a transaction between a buyer (buyerId) and a seller (sellerId).
I have created a blank matrix B with the rows corresponding to the buyerId and columns to the seller Id. I'd like to fill this matrix B with binary values, 1 representing a transaction between a buyer and a seller.
eg. row 200 in table A is 12345, 99887 (buyerId, sellerId)
For matrix B, the entry with the row named (not indexed!) 12345 and column named 99887 will have a 1.
How can I do this?