Parallel computing with R using foreach, future, and other packages
summary
Explains how foreach’s %dopar% operator and a .combine like rbind let map/reduce loops run either sequentially or in parallel (demo uses two worker processes), how registerDoParallel(n) controls cores, and how doMPI/doRedis adapters support MPI and Redis clusters. Describes future (and doFuture) as syntax-agnostic parallelism that auto-exports lexical variables to workers and interoperates with foreach, notes a composition operator for nested parallelism, and mentions debugging options like stop-on-first-error and log capture.
AI-written summary · about
chapters (7)
- 0:00Start
- 7:32Despite the for-loop syntax, foreach works kinda like
- 10:13The future package is not opinionated, you can do the same thing with any syntax!
- 10:40Scoped objects are auto-magically exported
- 11:20Compose two foreach loops with the %% operator
- 12:00Future works interoperably with foreach through doFuture, as do other parallel adapters
- 14:41Don't mourn...
related talks
51mProgramming in the Tidyverse
43mInteroperability between R Language & other Languages
46mElegant R: Tips from a Software Developer
22mUsing Python & R in Harmony
31mChasing Pandas
28mRecords with Rank Polymorphism
01h 31mFrom C to Comonads to Climate: A Functional Programmer's Journey in Array Programming(…)
28mData Science in Ruby? Is it possible? Is it Fast? Should we use it?
