Process optimisation of code within dopar
问题 I am trying to optimize my code to run glms multiple times, and I would like to leverage parallelization, either with foreach or some other more efficient way. As you can see; the for loop takes about 800 secs to run 270000 glms; while foreach with dopar unintuitively takes for ever (It either crashes or I force it to stop after a couple of hours). Thanks for your help. Jinesh library(data.table) library(parallel) library(doParallel) library(foreach) scen_bin <- expand.grid(n = c(10, 20, 30),