I have a datastructure which looks like below
id year club
"A" "2010" "C1"
"B" "2010" "C1"
"C" "2010" "C2"
"A" "2011" "C1"
"B" "2011" "C2"
etc. My problem is to create a matrix on a year by year basis where the each unique individual is fixed to a row and each unique club is fixed to a column. If in a given year the individual visits the club the corresponding intersecting cell takes the value of 1 else 0.
Any help on this is much appreciated.
Thanks Anup