I have a dataset like the following:
Age Monday Tuesday Wednesday
6-9 a b
6-9 b a c
6-9 c a
9-10 c c b
9-10 c a b
Using R, I want to get the following data set/ results (where 1 represents the presence of the element and 0 represents the absence):
Age a b c
6-9 1 1 0
6-9 1 1 1
6-9 1 0 1
9-10 0 1 1
9-10 1 1 1