Skip to content
Prev 1451 / 2152 Next

Parallel Linear Model

On Aug 22, 2012, at 12:04 PM, "Patrik Waldmann" <patrik.waldmann at boku.ac.at> wrote:

            
You don't need makeCluster (it is not a cluster call) but you may want to raise the number of cores (default is only 2) so
+ pval <- unlist(mclapply(1:dimx[2], function(i) summary(lm(y ~ x[,i]))$coefficients[2,4]))
+ )
   user  system elapsed 
 27.853   1.090   4.254 

Cheers,
Simon