search for: 327399

Displaying 1 result from an estimated 1 matches for "327399".

Did you mean: 327.99
2011 Jan 05
1
speed up in R apply
Hi, I am doing some simulations and found a bottle neck in my R script. I made an example: > a = matrix(rnorm(5000000),1000000,5) > tt = Sys.time(); sum(a[,1]*a[,2]*a[,3]*a[,4]*a[,5]); Sys.time() - tt [1] -1291.026 Time difference of 0.2354031 secs > > tt = Sys.time(); sum(apply(a,1,prod)); Sys.time() - tt [1] -1291.026 Time difference of 20.23150 secs Is there a faster way of