For HPC users: Replace crew_controller_local() with crew_controller_slurm() and define your job submission template. The API remains identical.
library(crew) controller <- crew_controller_local( name = "my_cluster", workers = 4, tasks_max = 100 # Auto-restart workers after 100 tasks ) Start the workers controller$start()
tar_option_set( controller = crew_controller_local(workers = 10) ) Suddenly, your pipeline is running across a fleet of auto-healing workers without changing a single analysis step. crew is not a parallel engine itself. It is a controller specification that leverages two incredibly fast lower-level packages: mirai (for asynchronous task execution) and nanonext (for low-level networking).
For analysts running one-off scripts, the overhead of learning crew might not be worth it. But for data scientists building automated reports, for bioinformaticians processing thousands of genomes, and for production pipelines that must run at 3 AM without failing— crew is quietly becoming the gold standard.
Furthermore, crew requires that your worker sessions be fully self-contained. Any library, function, or data object must be loaded or passed explicitly. There is no "magic" global environment inheritance. crew is the industrial-grade conveyor belt that the R ecosystem has been missing. It doesn't try to be the flashiest parallel package; instead, it focuses on being the most reliable .
With crew :
In the rapidly evolving landscape of R, the line between "script" and "orchestration" has never been thinner. For years, if you needed to run tasks in parallel, manage complex dependencies, or scale a workflow beyond the limits of your local memory, you reached for packages like future , foreach , or targets .
That’s it. The controller sits in your main R session. You push tasks to it, and it distributes them to persistent, resilient R sessions running in the background. # Non-blocking push controller$push( name = "long_compute", command = slow_function(data) ) Collect results later result <- controller$pop()