Search code examples
rparallel-foreachrparallel

Difference between 'foreach' and 'parallel' in R?


As the title suggest, I am confused about what is the difference between both package as they are both used in parallel computing in R.


Solution

  • foreach can execute using either %do% or %dopar% ... it only runs in parallel with %dopar%

    More information available here: https://cran.r-project.org/web/packages/foreach/vignettes/foreach.pdf