[R] efficient code. how to reduce running time?

Charilaos Skiadas skiadas at hanover.edu
Mon Jan 22 01:00:34 CET 2007


On Jan 21, 2007, at 5:55 PM, miraceti wrote:

> Thank you all for lookin at it.
> I'll fix the code to preallocate the objects.
> and I wonder if there is a way to call anova on all the columns at  
> the same
> time..
> Right now I am calling (Y~V1, data) from V1 to V50 thru a loop.
> I tried (Y~., data) but it gave me different values from the  
> results I get
> when I call them separately,
> So I can't help but call them 25,000 times...

Have you looked at lapply, sapply, apply and friends?

Haris



More information about the R-help mailing list