Skip to content
Prev 3526 / 15274 Next

extracting a subTable

Hello,

Something you can do is first, find the indexes to extract as follows:

indexes.to.extract <- tapply(table.1$Seq, tablle.1$ID, max)

Then, table.2 is just

table.2 <- table.1[ indexes.to.extract, ]

You could do it in just one line. I think this is as efficient as it can
get.

Best regards,

Carlos J. Gil Bellosta
http://www.datanalytics.com
On Wed, 2009-01-14 at 16:30 -0500, Jorge Nieves wrote: