I have a data set that has 3 columns , (ID , D , AE).
sample=data.frame( ID=c(1,1,1,2,2,2), D=c(\'a\',\'b\',\'c\',\'a\',\'c\',\'c\'), AE=c(\'m\',\'x\',\'w\',\