Dear Bill.. .great, thanks for your quick response.
Cheers
Nico
On 3/7/2011 8:16 PM, bill.venab...@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, ]
__
R
project.org] On
Behalf Of Nicolas Gutierrez
Sent: Tuesday, 8 March 2011 1:52 PM
To: R help
Subject: [R] extract rows with unique values from data.frame
Hello!
I have the data frame "pop":
xloc yloc gonad indEneW Agent
123 20 516.74 1 0.02 20.21 0.25
223
Hello!
I have the data frame "pop":
xloc yloc gonad indEneW Agent
123 20 516.74 1 0.02 20.21 0.25
223 20 1143.20 1 0.02 20.21 0.50
321 19 250.00 1 0.02 20.21 0.25
422 15 251.98 1 0.02 18.69 0.25
524 18 598.08 1 0.02
3 matches
Mail list logo