Dimitris Rizopoulos: > dat[!duplicated(dat$Id), ] Very elegant. I didn't know about 'duplicated()' before now. Seems like a very useful function. -- Karl Ove Hufthammer