[R] for loop and if problem

Gabor Grothendieck ggrothendieck at gmail.com
Wed Jan 7 13:05:41 CET 2009


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)




More information about the R-help mailing list