Force foreach to combine at some point during a %dopar%

Viewed 26

I'm currently facing an issue using foreach (with doParallel) in R. I use the sum as combine function, but it appears that R waits for all the tasks to be completed before performing the sum. The fact is that my objects are pretty heavy and numerous, and my machine is unable to store all of those.

Is there any way to sum on the fly (in other words, to force a call to the combine function within the foreach) ? Thank you :)

0 Answers
Related