Dear Bill.. .great, thanks for your quick response. Cheers Nico On 3/7/2011 8:16 PM, Bill.Venables at csiro.au wrote: > i<- with(pop, cumsum(!duplicated(cbind(xloc, yloc)))) >> >> k<- 2 ## how many do you want? >> >> no<- min(which(i == k)) >> pop[1:no, ]