For example let's take the 6 x 2 data set below
ID Val
1 yes
2 yes
3 yes
2 no
3 yes
1 no
People with the same ID are in the same "group" and I'd want to make a column that signifies whether or not they had the same answer so like Val[person 1] == Val[person 2]