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

From: Charilaos Skiadas <>
Date: Mon 22 Jan 2007 - 00:00:34 GMT

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 mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Mon Jan 22 11:05:37 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 22 Jan 2007 - 01:30:32 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.