Skip to content
Prev 246532 / 398502 Next

speed up in R apply

On Jan 5, 2011, at 2:40 PM, Douglas Bates wrote:

            
Thanks for pointing  that out. I misread the OP's code.
Slightly faster would be:

system.time(pr3 <- Reduce("*", as.data.frame(a)))

And thanks for the nice example. Using a data.frame to feed Reduce  
materially enhances its value to me.
--
David Winsemius, MD
West Hartford, CT