[Rd] Slow ttests in R-devel

Jeff Gentry jgentry at jimmy.harvard.edu
Wed Jun 4 15:18:42 MEST 2003


Hello ...

I've noticed that some of our Bioconductor code was running drastically
slower under current R-devel vs. current R-patched - one example is below
using a ttest.  I have the following snippet of code that demonstrates the
problem while avoiding "real" code that takes an extremely long time to
finish on R-devel:

library(genefilter)
data(eset)
eset$cov1
z <- ttest(eset$cov1, p=0.01)
gf <- filterfun(z)
system.time(genefilter(eset, gf))

(this requires the genefilter & Biobase packages from Bioconductor)

Using R-1.7.0p I had the following output:
> data(eset)
> eset$cov1
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2
> z <- ttest(eset$cov1, p=0.01)
> gf <- filterfun(z)
> system.time(genefilter(eset, gf))
[1] 41.73  2.04 44.45  0.00  0.00

And using R-devel, I have:
> data(eset)
> eset$cov1
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2
> z <- ttest(eset$cov1, p=0.01)
> gf <- filterfun(z)
> system.time(genefilter(eset, gf))
[1] 80.56  4.20 85.12  0.00  0.00

Any ideas what might be causing this?

Thanks
-Jeff



More information about the R-devel mailing list