futurize
Parallelize Common Functions via One Magic Function
Description
The futurize() function transpiles calls to 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 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', 'fgsea', 'fwb', 'gamlss', 'glmmTMB', 'glmnet', 'kernelshap', 'lme4', 'metafor', 'mgcv', 'partykit', 'riskRegression', 'seriation', 'shapr', 'SimDesign', 'strucchange', 'tm', 'TSP', and 'vegan') and on Bioconductor (e.g. 'DESeq2', 'GenomicAlignments', 'GSVA', 'Rsamtools', 'scater', 'scuttle', 'SingleCellExperiment', and 'sva').
Downloads
1K
Last 30 days
3754th
2.1K
Last 90 days
2.1K
Last year
Trend: +70.5% (30d vs prior 30d)
CRAN Check Status
Show all 14 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-macos-arm64 | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | NOTE |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | ERROR |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (2 non-OK)
package dependencies
Packages suggested but not available for checking: 'GSVA', 'scater'
tests
Running ‘test-api.R’ [27s/34s]
Running ‘test-doFuture-foreach_dofuture,errors.R’ [12s/27s]
Running ‘test-doFuture-foreach_dofuture,globals.R’ [16s/26s]
Running ‘test-doFuture-foreach_dofuture,nested_colon.R’ [10s/28s]
Running ‘test-doFuture-foreach_dofuture,nested_dofuture.R’ [10s/35s]
Running ‘test-doFuture-foreach_dofuture,rng.R’ [5s/9s]
Running ‘test-doFuture-foreach_dofuture-options,nested.R’ [6s/11s]
Running ‘test-doFuture-foreach_dofuture.R’ [3s/6s]
Running ‘test-doFuture-times.R’ [3s/6s]
Running ‘test-furrr-future_imap.R’ [2s/2s]
Running ‘test-furrr-future_invoke-map.R’ [1s/2s]
Running ‘test-furrr-future_map.R’ [2s/3s]
Running ‘test-furrr-future_map2.R’ [2s/3s]
Running ‘test-furrr-future_modify.R’ [2s/3s]
Running ‘test-furrr-future_pmap.R’ [2s/2s]
Running ‘test-furrr-future_walk.R’ [1s/2s]
Running ‘test-future.apply-future_Filter.R’ [1s/3s]
Running ‘test-future.apply-future_apply.R’ [8s/11s]
Running ‘test-future.apply-future_by.R’ [3s/6s]
Ru
...[truncated]...
inst/testme/deploy.R
> futurize:::testme("furrr-future_pmap")
Test 'furrr-future_pmap' ...
chr "none"
> if (requireNamespace("purrr") && requireNamespace("furrr")) {
+ library(futurize)
+ library(purrr)
+ message("future_pmap() matches pmap ..." ... [TRUNCATED]
Loading required namespace: purrr
Loading required namespace: furrr
Loading required package: future
future_pmap() matches pmap() for simple cases
names of `.x` are retained
named empty input makes named empty output
future_pmap_dbl() works
future_pmap_int() works
future_pmap_lgl() works
future_pmap_chr() works
future_pmap_raw() works
Error in get_transpiler(expr, envir = envir, type = type, what = what, :
Do not know how to futurize function: pmap_raw()
Calls: <Anonymous> -> source -> withVisible -> eval -> eval -> main -> testme_run_test -> source -> withVisible -> eval -> eval -> stopifnot -> identical -> futurize -> transpile -> get_transpiler
Execution halted
Check History
ERROR 11 OK · 1 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE Apr 1, 2026
tests
Running ‘test-api.R’ [47s/57s] Running ‘test-doFuture-foreach_dofuture,errors.R’ [20s/39s] Running ‘test-doFuture-foreach_dofuture,globals.R’ [26s/43s] Running ‘test-doFuture-foreach_dofuture,nested_colon.R’ [16s/39s] Running ‘test-doFuture-f ...[truncated]... to futurize function: pmap_raw() Calls: <Anonymous> -> source -> withVisible -> eval -> eval -> main -> testme_run_test -> source -> withVisible -> eval -> eval -> stopifnot -> identical -> futurize -> transpile -> get_transpiler Execution halted
tests
Running ‘test-api.R’ [46s/56s] Running ‘test-doFuture-foreach_dofuture,errors.R’ [20s/41s] Running ‘test-doFuture-foreach_dofuture,globals.R’ [27s/41s] Running ‘test-doFuture-foreach_dofuture,nested_colon.R’ [17s/42s] Running ‘test-doFuture-f ...[truncated]... to futurize function: pmap_raw() Calls: <Anonymous> -> source -> withVisible -> eval -> eval -> main -> testme_run_test -> source -> withVisible -> eval -> eval -> stopifnot -> identical -> futurize -> transpile -> get_transpiler Execution halted
package dependencies
Packages suggested but not available for checking: 'GSVA', 'scater'
NOTE 13 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 18, 2026
package dependencies
Packages suggested but not available for checking: 'GSVA', 'scater'