On Wed, Jan 7, 2009 at 3:51 AM, Sake <tlep.nav.ekas at hccnet.nl> wrote: > aggregate(data[, c("Exon_Start.Chr.")], by = list(data$Gene), min) > aggregate(data[, c("Exon_Stop.Chr.")], by = list(data$Gene), max) That could be written: aggregate(data["Excon_Start.Chr."], data["Gene"], min) aggregate(data["Excon_Start.Chr."], data["Gene"], max)