[BioC] CPU time of Anova in R

Adaikalavan Ramasamy ramasamy at cancer.org.uk
Mon Jul 11 13:16:26 CEST 2005


This might be slightly faster

apply( Exprs, 1, function(x){ anova( lm( x ~ scheme ) )[1,5] } )

and should get you the correct names from Exprs. BTW, have you
considered using LIMMA which is designed for such purposes.

Regards, Adai



On Mon, 2005-07-11 at 12:19 +0200, Marcin Piechota wrote:
> Hi
> 
> I have problem with very long lasting time of anova in R.
> 
> My script:
> Exprs <- exprs(eset)
> Anno <- geneNames(eset)
> scheme <- gl(4,3,12, labels=c("a", "b","c", "d"))
> x<-matrix(1:90202,nrow=45101, ncol=2) 
> for (i in 1:45101) {
> Data = Exprs[i,]
> results <- lm(Data~schemat)
> nextstep <- anova(results)
> x[i,] <- c(Anno[i],nextstep[1,5])
> }
> 
> where "eset' is rma normalized affy data from m430v2
> 
> this script lasts for about 20 minutes
> on P4 3GHz, 4GB RAM
> 
> How to make it shorter?
> 
> Marcin Piechota
> Institute of Pharmacology PAS Krakow
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
>



More information about the Bioconductor mailing list