Re: [R] sort or order problem.

2009-01-18 Thread Jorge Ivan Velez
Dear Gregg, Take a look at ?duplicates. Here is an example: z<-data.frame( ID=c(1,1,2,1,1,1,1,2,2,3,4,3,2,2,2,2,3,4,4,5,5,6,6,7), y=rnorm(24) ) z[!duplicated(z$ID),] See ?duplicated for more information. HTH, Jorge On Sun, Jan 18, 2009 at 11:27 PM, wrote: > Thanks to everyone who

[R] sort or order problem.

2009-01-18 Thread GreggAllen
Thanks to everyone who helped me when I was totally clueless. Now I'm only partially clueless, and in writing functions, which is major progress. This is a function that is a major improvement over which I was using MS Excel for: function() { files <- list.files(pattern="ABN*") # All the mod