My data currently has multiple rows per person, and each of these rows contain an array that looks at whether or not the person was on a drug from 1-365. There are three different array's per person(A,B,C) since there are three classes of drugs that I am looking at.
I want to be able to see when one person is taking all three of them at the same time, and get a count of how many times it happends for the entire year.
example: IF A[112]='1' and B[112]= '1' and C[112]='1' then overlap_count=(1)
since these are all on seperate rows I would need the count to work on a key level and have the overlap_count displayed on each of the rows.
... View more