Parallelize Common Functions via One Magic Function
Overview
The futurize() function doi:10.48550/arXiv.2601.17578 turns sequential map-reduce functions such as base::lapply(), purrr::map(), 'foreach::foreach() %do% { ... }' into concurrent alternatives, providing you with a simple, straightforward path to scalable parallel computing via the 'future' ecosystem doi:10.32614/RJ-2021-048. By combining this transpiler function with R's native pipe operator, you have a convenient way for speeding up iterative computations with minimal refactoring, e.g. 'lapply(xs, fcn) |> futurize()', 'purrr::map(xs, fcn) |> futurize()', and 'foreach::foreach(x = xs) %do% { fcn(x) } |> futurize()'. Other map-reduce packages that can be "futurized" are 'BiocParallel', 'plyr', 'crossmap', 'pbapply' packages. There is also support for a growing set of domain-specific packages on CRAN (e.g. 'boot', 'caret', 'DiceKriging', 'ez', 'fgsea', 'fwb', 'gamlss', 'glmmTMB', 'glmnet', 'kernelshap', 'lme4', 'metafor', 'mgcv', 'modelsummary', 'parameters', 'partykit', 'pls', 'pvclust', 'riskRegression', 'rugarch', 'sandwich', 'seriation', 'shapr', 'Sim.DiffProc', 'SimDesign', 'stars', 'strucchange', 'SuperLearner', 'terra', 'tm', 'TSP', and 'vegan') and on Bioconductor (e.g. 'DESeq2', 'GenomicAlignments', 'GSVA', 'Rsamtools', 'scater', 'scuttle', 'SingleCellExperiment', and 'sva').
Significant Changes
- Futurizing
foreach(..., .options.future = list(...)) %do% { ... }is now an error, because%do%never supported such options in the first place. Instead, pass future options tofuturize(), e.g.foreach(...) %do% { ... } |> futurize(seed = TRUE). Previously, such attempts were silently ignored. - Futurization of **GSVA** functions will stop working with **GSVA** (>= 2.7.0).
New Transpilers
- Add support for domain-specific CRAN package **terra**, e.g.
res <- tile_apply(r, function(x) x * 2) |> futurize().
New Features
Show all changes in 1.1.0Hide the rest of the changes in 1.1.0
futurize()now unwrapswithCallingHandlers(), e.g.withCallingHandlers(lapply(xs, fcn), warning = ...) |> futurize().- Futurization of **lme4** functions now uses
parallel = "future"available in **lme4** (>= 2.0-6). Older versions are still supported.
Bug Fixes
- Option
chunk_sizewas ignored when futurizingtimes(n) %do% { ... }. - Futurize option
packageswould drop packages that the transpiler declares as required on parallel workers. - Futurizing a call that specifies an argument that
futurize()sets, e.g.bplapply(xs, fcn, BPPARAM = SerialParam()), orboot(..., parallel = "multicore"), gave an obscure error message. Now it gives an informative error. - Futurizing a call to an S3 or S4 generic function, whose first argument is a function call, e.g.
influence(lmer(...)) |> futurize(), would evaluate that first argument twice; once to identify the method to be called, and once more when calling it. Now it is evaluated only once. - Attempts to futurize a generic function that dispatches to an unsupported S3 or S4 method gave an uninformative error message, e.g.
summary(fit) |> futurize()and, with **BiocGenerics** attached,lapply(x, fcn) |> futurize()for an **S4Vectors**List. Now the error message names the method, its package, and the class dispatched on. - Attempts to futurize a function not part of a package gave an obscure error message suggestion to install a non-existing package.
- Attempts to futurize an expression that is not a function call, e.g.
{ x } |> futurize(), gave an obscure error message. - All futurize options, e.g.
seed,packages, andlabel, were ignored when futurizing **BiocParallel** functions. - Futurizing **plyr** functions with argument
.paroptsgave an obscure error. Now the.paroptsoptions are passed on as-is, unless they specify.options.future, which gives an informative error suggesting to pass such options tofuturize()instead. - Futurizing **plyr** functions produced a "No parallel backend registered" warning when using a single parallel worker, e.g.
plan(sequential).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-16
- ERROR12 OK, 1 ERROR2026-07-13
- OK13 OK2026-06-09
Show 6 earlier changesHide 6 earlier changes
- ERROR12 OK, 1 ERROR2026-06-08
- OK12 OK2026-04-25
- NOTE13 OK, 1 NOTE2026-04-09
- ERROR11 OK, 1 NOTE, 2 ERROR2026-04-01
- NOTE13 OK, 1 NOTE2026-03-19
- OK14 OK2026-03-10
Documentation
- Help pages
- 5 (1 internal)
- Examples that run
- 100%3 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 94%
- Return-value docs
- 100%
- Help pages citing references
- 0%
- Parallelize 'BiocParallel' functions
- Parallelize 'boot' functions
- Parallelize 'caret' functions
- Parallelize 'crossmap' functions
- Parallelize 'DESeq2' functions
- Parallelize 'DiceKriging' functions
- Parallelize 'ez' functions
- Parallelize 'fgsea' functions
- Parallelize 'foreach' functions
- Parallelize 'fwb' functions
Show 37 moreHide 37 vignettes
- Parallelize 'gamlss' functions
- Parallelize 'GenomicAlignments' functions
- Parallelize 'glmmTMB' functions
- Parallelize 'glmnet' functions
- Parallelize 'GSVA' functions
- Parallelize 'kernelshap' functions
- Parallelize 'lme4' functions
- Parallelize 'metafor' functions
- Parallelize 'mgcv' functions
- Parallelize 'modelsummary' functions
- Parallelize 'parameters' functions
- Parallelize 'partykit' functions
- Parallelize 'pbapply' functions
- Parallelize 'pls' functions
- Parallelize 'plyr' functions
- Parallelize 'purrr' functions
- Parallelize 'pvclust' functions
- Parallelize 'riskRegression' functions
- Parallelize 'Rsamtools' functions
- Parallelize 'rugarch' functions
- Parallelize 'sandwich' functions
- Parallelize 'scater' functions
- Parallelize 'scuttle' functions
- Parallelize 'seriation' functions
- Parallelize 'shapr' functions
- Parallelize 'Sim.DiffProc' functions
- Parallelize 'SimDesign' functions
- Parallelize 'SingleCellExperiment' functions
- Parallelize 'stars' functions
- Parallelize 'strucchange' functions
- Parallelize 'SuperLearner' functions
- Parallelize 'sva' functions
- Parallelize 'terra' functions
- Parallelize 'tm' functions
- Parallelize 'TSP' functions
- Parallelize 'vegan' functions
- Parallelize base-R apply functions
Downloads
Repository
- PRs merged (all time)
- 67%
- Median days to close, 50 most recently updated closed issues
- 12
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Issues over time
PRs over time
Commits over time
Commit identities over time
10 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/futureverse/futurize on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Show all practicesHide 2 practices
Dependencies
Installing futurize adds 5 packages (2 with compiled code, 1.1 MB of source tarballs). Heaviest: future 477 KB, parallelly 343 KB, digest 231 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.1.0Latest2026-10-19 · current release · diff ↗ ·
listed once in CRAN's queue
Seen in one reading of CRAN's incoming queue, at 2026-10-19 05:32 UTC, so it stayed less than the time between readings. - 1.0.02026-06-12 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 0.3.02026-04-01 · diff ↗
- 0.2.02026-03-18 · diff ↗
- 0.1.02026-01-22
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-01-22
- Total releases
- 5 / 1 yrs
- License
- Apache License (>= 2) · relicensed from GPL (>= 3) in 1.0.0
- Minimum R
- ≥ 4.1.0
- Download size
- 881 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("futurize")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.48550/arxiv.2601.17578, 10.32614/rj-2021-048.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.