Skip to content
Prev 306369 / 398502 Next

Removing duplicates without a for loop

On Sep 26, 2012, at 11:23 AM, Rui Barradas wrote:

            
If these are sorted by date, then the oldest date would come first any you would want:

 aggregate(dat, by = list(dat$date), FUN = head, 1)
-- 
David.