I have a data set that has 3 columns , (ID , D , AE).
sample=data.frame( ID=c(1,1,1,1,2,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5), D=c(\'a\',\'b\',\'c\',\'d\',\'e\',\'f\