{"id":50721706,"url":"https://github.com/futureverse/futurize","last_synced_at":"2026-06-10T00:30:45.931Z","repository":{"id":334116798,"uuid":"953310723","full_name":"futureverse/futurize","owner":"futureverse","description":"🚀 futurize: Parallelize Common Functions via One Magic Function","archived":false,"fork":false,"pushed_at":"2026-06-06T21:13:09.000Z","size":10584,"stargazers_count":25,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2026-06-06T22:09:16.713Z","etag":null,"topics":["future","futureverse","package","parallel-programming","r","transpiler"],"latest_commit_sha":null,"homepage":"https://futurize.futureverse.org/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/futureverse.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-23T03:48:42.000Z","updated_at":"2026-06-06T21:13:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/futureverse/futurize","commit_stats":null,"previous_names":["futureverse/futurize"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/futureverse/futurize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futureverse%2Ffuturize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futureverse%2Ffuturize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futureverse%2Ffuturize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futureverse%2Ffuturize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/futureverse","download_url":"https://codeload.github.com/futureverse/futurize/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futureverse%2Ffuturize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34132030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["future","futureverse","package","parallel-programming","r","transpiler"],"created_at":"2026-06-10T00:30:45.173Z","updated_at":"2026-06-10T00:30:45.926Z","avatar_url":"https://github.com/futureverse.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"badges\"\u003e\u003c!-- pkgdown markup --\u003e\n\u003ca href=\"https://CRAN.R-project.org/web/checks/check_results_futurize.html\"\u003e\u003cimg border=\"0\" src=\"https://www.r-pkg.org/badges/version/futurize\" alt=\"CRAN check status\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/futureverse/futurize/actions?query=workflow%3AR-CMD-check\"\u003e\u003cimg border=\"0\" src=\"https://github.com/futureverse/futurize/actions/workflows/R-CMD-check.yaml/badge.svg?branch=develop\" alt=\"R CMD check status\"/\u003e\u003c/a\u003e     \u003ca href=\"https://app.codecov.io/gh/futureverse/futurize\"\u003e\u003cimg border=\"0\" src=\"https://codecov.io/gh/futureverse/futurize/branch/develop/graph/badge.svg\" alt=\"Coverage Status\"/\u003e\u003c/a\u003e \n\u003c/div\u003e\n\n# futurize: Parallelize Common Functions via One Magic Function \u003cimg border=\"0\" src=\"man/figures/futurize-logo.png\" style=\"width: 120px; margin: 2ex;\" alt=\"The 'futurize' hexlogo\" align=\"right\"/\u003e\n\n## TL;DR \n\nThe **futurize** package makes it extremely simple to parallelize your\nexisting map-reduce calls, but also a growing set of domain-specific\ncalls.  All you need to know is that there is a single function called\n`futurize()` that will take care of everything, e.g.\n\n```r\ny \u003c- lapply(x, fcn) |\u003e futurize()\ny \u003c- map(x, fcn) |\u003e futurize()\nb \u003c- boot(city, ratio, R = 999) |\u003e futurize()\n```\n\nThe `futurize()` function parallelizes via **[futureverse]**, meaning\nyour code can take advantage of any **[supported future backends]**,\nwhether it be parallelization on your local computer, across multiple\ncomputers, in the cloud, or on a high-performance compute (HPC) cluster.\nThe **futurize** package has only one hard dependency - the\n**[future]** package. All other dependencies are optional \"buy-in\"\ndependencies as shown in the below tables.\n\nIn addition to getting access to all future-based parallel backends,\nby using `futurize()` you also get access to all the benefits that\ncomes with **futureverse**. Notably, if the function you parallelize\noutputs messages and warnings, they will be relayed from the parallel\nworker to your main R session, just as you get when running\nsequentially. This is particularly useful when troubleshooting or\ndebugging.\n\n\n## Supported map-reduce packages\n\nThe **futurize** package supports transpilation of functions from\nmultiple packages. The tables below summarize the supported map-reduce\n(Table 1) and domain-specific (Tables 2 and 3) functions,\nrespectively.  To programmatically see which packages are currently\nsupported, use:\n\n```r\nfuturize_supported_packages()\n```\nTo see which functions are supported for a specific package, use:\n\n```r\nfuturize_supported_functions(\"caret\")\n```\n\n| Package            | Functions                                                                                                          | Requires                 |\n|--------------------|--------------------------------------------------------------------------------------------------------------------|--------------------------|\n| **base**           | `lapply()`, `sapply()`, `tapply()`, `vapply()`, `mapply()`, `.mapply()`, `Map()`, `eapply()`, `apply()`, `by()`, `replicate()`, `Filter()` | **[future.apply]** |\n| **stats**          | `kernapply()`                                                                                  | **[future.apply]** |\n| **[purrr]**        | `map()` and variants, `map2()` and variants, `pmap()` and variants, `imap()` and variants, `modify()`, `modify_if()`, `modify_at()`, `map_if()`, `map_at()` | **[furrr]** |\n| **[crossmap]**     | `xmap()` and variants, `xwalk()`, `map_vec()`, `map2_vec()`, `pmap_vec()`, `imap_vec()`        | -                  |\n| **[foreach]**      | `%do%`, e.g. `foreach() %do% { }`, `times() %do% { }`                                          | **[doFuture]**     | \n| **[plyr]**         | `aaply()` and variants, `ddply()` and variants, `llply()` and variants, `mlply()` and variants | **[doFuture]**     | \n| **[pbapply]**      | `pblapply()`, `pbsapply()` and variants, `pbby()`, `pbreplicate()` and `pbwalk()`              | **[future.apply]** |\n| **[BiocParallel]** | `bplapply()`, `bpmapply()`, `bpvec()`, `bpiterate()`, `bpaggregate()`                          | **[doFuture]**     | \n\n_Table 1: Map-reduce functions currently supported by `futurize()` for parallel transpilation._\n\nHere are some examples:\n\n```r\nlibrary(futurize)\nplan(multisession)\n\nxs \u003c- 1:10\nys \u003c- lapply(xs, sqrt) |\u003e futurize()\n\nxs \u003c- 1:10\nys \u003c- purrr::map(xs, sqrt) |\u003e futurize()\n\nxs \u003c- 1:10\nys \u003c- crossmap::xmap_dbl(xs, ~ .y * .x) |\u003e futurize()\n\nlibrary(foreach)\nxs \u003c- 1:10\nys \u003c- foreach(x = xs) %do% { sqrt(x) } |\u003e futurize()\n\nxs \u003c- 1:10\nys \u003c- plyr::llply(xs, sqrt) |\u003e futurize()\n\nxs \u003c- 1:10\nys \u003c- pbapply::pblapply(xs, sqrt) |\u003e futurize()\n\nxs \u003c- 1:10\nys \u003c- BiocParallel::bplapply(xs, sqrt) |\u003e futurize()\n```\n\nand\n\n```r\nys \u003c- replicate(3, rnorm(1)) |\u003e futurize()\n\ny \u003c- by(warpbreaks, warpbreaks[,\"tension\"],\n        function(x) lm(breaks ~ wool, data = x)) |\u003e futurize()\n\nxs \u003c- EuStockMarkets[, 1:2]\nk \u003c- kernel(\"daniell\", 50)\nxs_smooth \u003c- stats::kernapply(xs, k = k) |\u003e futurize()\n```\n\n\n## Supported domain-specific packages\n\nYou can also futurize calls from a growing set of domain-specific CRAN\nand Bioconductor packages that have optional built-in support for\nparallelization.\n\n### CRAN packages with support for futurize\n\n| Package                    | Functions                                                                    | Requires           |\n|----------------------------|------------------------------------------------------------------------------|--------------------|\n| **[boot]**                 | `boot()`, `censboot()`, `tsboot()`                                           | -                  |\n| **[caret]**                | `bag()`, `gafs()`, `nearZeroVar()`, `rfe()`, `safs()`, `sbf()`, `train()`    | **[doFuture]**     |\n| **[DiceKriging]**          | `km()`                                                                       | **[doFuture]**     |\n| **[ez]**                   | `ezBoot()`, `ezPerm()`, `ezPlot2()`                                          | **[doFuture]**     |\n| **[fwb]**                  | `fwb()`, `vcovFWB()`                                                         | -                  |\n| **[gamlss]**               | `add1All()`, `add1TGD()`, `drop1All()`, `drop1TGD()`, `gamlssCV()`           | -                  |\n| **[glmmTMB]**              | `profile()` for 'glmmTMB'                                                    | -                  |\n| **[glmnet]**               | `cv.glmnet()`                                                                | **[doFuture]**     |\n| **[kernelshap]**           | `kernelshap()`, `permshap()`                                                 | **[doFuture]**     |\n| **[lme4]**                 | `allFit()`, `bootMer()`, `influence()` and `profile()` for 'merMod'          | -                  |\n| **[metafor]**              | `profile()`, `rstudent()`, `cooks.distance()`, `dfbetas()` for 'rma'         | -                  |\n| **[mgcv]**                 | `bam()`, `predict()` for 'bam'                                               | -                  |\n| **[modelsummary]**         | `modelsummary()`, `msummary()`, `modelplot()`                                | **[future.apply]** |\n| **[parameters]**           | `bootstrap_model()`, `bootstrap_parameters()`                                | -                  |\n| **[partykit]**             | `cforest()`, `ctree_control()`, `mob_control()`, `varimp()` for 'cforest'    | **[future.apply]** |\n| **[pls]**                  | `mvr()`, `plsr()`, `pcr()`, `cppls()`, `crossval()`                          | -                  |\n| **[pvclust]**              | `pvclust()`                                                                  | -                  |\n| **[riskRegression]**       | `Score()` for 'list'                                                         | **[doFuture]**     |\n| **[rugarch]**              | `arfimacv()`, `arfimadistribution()`, `arfimaroll()`, `autoarfima()`, `multifilter()`, `multifit()`, `multiforecast()`, `ugarchboot()`, `ugarchdistribution()`, `ugarchroll()` | -                  |\n| **[sandwich]**             | `vcovBS()`, `vcovJK()`                                                       | **[future.apply]** |\n| **[seriation]**            | `seriate_best()`, `seriate_rep()`                                            | **[doFuture]**     |\n| **[shapr]**                | `explain()`, `explain_forecast()`                                            | -                  |\n| **[Sim.DiffProc]**         | `MCM.sde()`                                                                  | -                  |\n| **[SimDesign]**            | `runSimulation()`, `runArraySimulation()`                                    | -                  |\n| **[stars]**                | `st_apply()`                                                                 | **[future.apply]** |\n| **[strucchange]**          | `breakpoints()` for 'formula'                                                | **[doFuture]**     |\n| **[SuperLearner]**         | `CV.SuperLearner()`                                                          | -                  |\n| **[tm]**                   | `TermDocumentMatrix()`, `tm_index()`, `tm_map()`                             | -                  |\n| **[TSP]**                  | `solve_TSP()`                                                                | **[doFuture]**     |\n| **[vegan]**                | `adonis()`, `adonis2()`, `anova()` for 'cca', `anosim()`, `cascadeKM()`, `estaccumR()`, `mantel()`, `mantel.partial()`, `metaMDSiter()`, `mrpp()`, `oecosimu()`, `ordiareatest()`, `permutest()` for 'betadisper', and 'cca'  | -                  |\n\n_Table 2: CRAN packages with domain-specific functions currently\nsupported by `futurize()` for parallel transpilation._\n\nHere are some examples:\n\n```r\nratio \u003c- function(d, w) sum(d$x * w)/sum(d$u * w)\nb \u003c- boot::boot(boot::city, ratio, R = 999) |\u003e futurize()\n\nctrl \u003c- caret::trainControl(method = \"cv\", number = 10)\nmodel \u003c- caret::train(Species ~ ., data = iris, method = \"rf\", trControl = ctrl) |\u003e futurize()\n\nrt \u003c- ez::ezBoot(data = ANT, dv = rt, wid = subnum, within = .(cue, flank), between = group) |\u003e futurize()\n\nf \u003c- fwb::fwb(boot::city, ratio, R = 999) |\u003e futurize()\n\nm \u003c- DiceKriging::km(~., design = design, response = response, multistart = 8L) |\u003e futurize()\n\ncv \u003c- gamlss::gamlssCV(y ~ pb(x), data = abdom, K.fold = 10) |\u003e futurize()\n\ncv \u003c- glmnet::cv.glmnet(x, y) |\u003e futurize()\n\nks \u003c- kernelshap::kernelshap(model, X = x_explain, bg_X = bg_X) |\u003e futurize()\n\nm \u003c- lme4::allFit(models) |\u003e futurize()\n\nfit \u003c- metafor::rma(yi, vi)\npr \u003c- profile(fit) |\u003e futurize()\n\nb \u003c- mgcv::bam(y ~ s(x0, bs = bs) + s(x1, bs = bs), data = dat) |\u003e futurize()\n\nfit \u003c- parameters::bootstrap_model(model, iterations = 1000) |\u003e futurize()\n\ncf \u003c- partykit::cforest(dist ~ speed, data = cars) |\u003e futurize()\n\nm \u003c- pls::plsr(density ~ NIR, ncomp = 10, data = yarn, validation = \"CV\") |\u003e futurize()\n\nfit \u003c- pvclust::pvclust(mtcars, nboot = 1000) |\u003e futurize()\n\nv \u003c- sandwich::vcovBS(fm) |\u003e futurize()\n\nsc \u003c- riskRegression::Score(list(\"CSC\" = fit), data = d,\n  formula = Hist(time, event) ~ 1, times = 5, B = 100,\n  split.method = \"bootcv\") |\u003e futurize()\n\nroll \u003c- rugarch::ugarchroll(spec, sp500ret, n.start = 1000, \n  refit.window = \"moving\", refit.every = 100) |\u003e futurize()\n\nresult \u003c- shapr::explain(model, x_explain, x_train, approach = \"empirical\", phi0 = phi0) |\u003e futurize()\n\n\no \u003c- seriation::seriate_best(d_supreme) |\u003e futurize()\n\nres \u003c- Sim.DiffProc::MCM.sde(model, statistic = stat, R = 100) |\u003e futurize()\n\nres \u003c- SimDesign::runSimulation(Design, replications = 1000,\n  generate = Generate, analyse = Analyse, summarise = Summarise) |\u003e futurize()\n\ns \u003c- stars::st_as_stars(matrix(1:20, nrow = 5, ncol = 4))\nres \u003c- stars::st_apply(s, MARGIN = 1, FUN = mean) |\u003e futurize()\n\nbp \u003c- strucchange::breakpoints(Nile ~ 1) |\u003e futurize()\n\nres \u003c- SuperLearner::CV.SuperLearner(Y, X, SL.library = SL.library) |\u003e futurize()\n\nm \u003c- tm::tm_map(crude, content_transformer(tolower)) |\u003e futurize()\n\ntour \u003c- TSP::solve_TSP(USCA50, method = \"nn\", rep = 10) |\u003e futurize()\n\nmd \u003c- vegan::mrpp(dune, Management) |\u003e futurize()\n```\n\n\n### Bioconductor packages with support for futurize\n\n| Package                    | Functions                                                                 | Requires           |\n|----------------------------|---------------------------------------------------------------------------|--------------------|\n| **[DESeq2]**               | `DESeq()`, `lfcShrink()`, `results()`                                     | **[doFuture]**     |\n| **[fgsea]**                | `fgsea()`, `fgseaMultilevel()`, `fgseaSimple()`, `fgseaLabel()`, `geseca()`, `gesecaSimple()`, `collapsePathwaysGeseca()` | **[doFuture]**     |\n| **[GenomicAlignments]**    | `summarizeOverlaps()`                                                     | **[doFuture]**     |\n| **[GSVA]**                 | `gsva()`, `gsvaRanks()`, `gsvaScores()`, `spatCor()`                      | **[doFuture]**     |\n| **[Rsamtools]**            | `countBam()`, `scanBam()`                                                 | **[doFuture]**     |\n| **[scater]**               | `calculatePCA()`, `calculateTSNE()`, `calculateUMAP()`, `runPCA()`, `runTSNE()`, `runUMAP()`, `runColDataPCA()`, `nexprs()`, `getVarianceExplained()`, `plotRLE()` | **[doFuture]** |\n| **[scuttle]**              | `calculateAverage()`, `logNormCounts()`, `normalizeCounts()`, `perCellQCMetrics()`, `perFeatureQCMetrics()`, `addPerCellQCMetrics()`, `addPerFeatureQCMetrics()`, `addPerCellQC()`, `addPerFeatureQC()`, `numDetectedAcrossCells()`, `numDetectedAcrossFeatures()`, `sumCountsAcrossCells()`, `sumCountsAcrossFeatures()`, `summarizeAssayByGroup()`, `aggregateAcrossCells()`, `aggregateAcrossFeatures()`, `librarySizeFactors()`, `computeLibraryFactors()`, `geometricSizeFactors()`, `computeGeometricFactors()`, `medianSizeFactors()`, `computeMedianFactors()`, `pooledSizeFactors()`, `computePooledFactors()`, `fitLinearModel()` | **[doFuture]** |\n| **[SingleCellExperiment]** | `applySCE()`                                                              | **[doFuture]**     |\n| **[sva]**                  | `ComBat()`, `read.degradation.matrix()`                                   | **[doFuture]**     |\n\n_Table 3: Bioconductor packages with domain-specific functions\ncurrently supported by `futurize()` for parallel transpilation._\n\n\nHere are some examples:\n\n```r\ndds \u003c- DESeq2::DESeq(dds) |\u003e futurize()\n\nres \u003c- fgsea::fgsea(pathways, stats) |\u003e futurize()\n\nse \u003c- GenomicAlignments::summarizeOverlaps(features, bam_files) |\u003e futurize()\n\nes \u003c- GSVA::gsva(GSVA::gsvaParam(expr, geneSets)) |\u003e futurize()\n\ncounts \u003c- Rsamtools::countBam(bamViews) |\u003e futurize()\n\nsce \u003c- scater::runPCA(sce) |\u003e futurize()\n\nqc \u003c- scuttle::perFeatureQCMetrics(sce) |\u003e futurize()\n\nresult \u003c- SingleCellExperiment::applySCE(sce, scuttle::perFeatureQCMetrics) |\u003e futurize()\n  \nadjusted \u003c- sva::ComBat(dat = dat, batch = batch) |\u003e futurize()\n```\n\n\n\n[futureverse]: https://www.futureverse.org\n[future]: https://future.futureverse.org\n[future.apply]: https://future.apply.futureverse.org\n[furrr]: https://furrr.futureverse.org\n[doFuture]: https://doFuture.futureverse.org\n[TSP]: https://cran.r-project.org/package=TSP\n[boot]: https://cran.r-project.org/package=boot\n[caret]: https://cran.r-project.org/package=caret\n[crossmap]: https://cran.r-project.org/package=crossmap\n[DESeq2]: https://bioconductor.org/packages/DESeq2/\n[DiceKriging]: https://cran.r-project.org/package=DiceKriging\n[ez]: https://cran.r-project.org/package=ez\n[fgsea]: https://bioconductor.org/packages/fgsea/\n[foreach]: https://cran.r-project.org/package=foreach\n[fwb]: https://ngreifer.github.io/fwb/\n[gamlss]: https://cran.r-project.org/package=gamlss\n[glmmTMB]: https://cran.r-project.org/package=glmmTMB\n[glmnet]: https://cran.r-project.org/package=glmnet\n[GenomicAlignments]: https://bioconductor.org/packages/GenomicAlignments/\n[GSVA]: https://bioconductor.org/packages/GSVA/\n[kernelshap]: https://cran.r-project.org/package=kernelshap\n[lme4]: https://cran.r-project.org/package=lme4\n[metafor]: https://cran.r-project.org/package=metafor\n[mgcv]: https://cran.r-project.org/package=mgcv\n[modelsummary]: https://cran.r-project.org/package=modelsummary\n[parameters]: https://cran.r-project.org/package=parameters\n[partykit]: https://cran.r-project.org/package=partykit\n[pbapply]: https://cran.r-project.org/package=pbapply\n[plyr]: https://cran.r-project.org/package=plyr\n[pls]: https://cran.r-project.org/package=pls\n[pvclust]: https://cran.r-project.org/package=pvclust\n[purrr]: https://cran.r-project.org/package=purrr\n[riskRegression]: https://cran.r-project.org/package=riskRegression\n[rugarch]: https://cran.r-project.org/package=rugarch\n[sandwich]: https://cran.r-project.org/package=sandwich\n[Rsamtools]: https://bioconductor.org/packages/Rsamtools/\n[scater]: https://bioconductor.org/packages/scater/\n[scuttle]: https://bioconductor.org/packages/scuttle/\n[SingleCellExperiment]: https://bioconductor.org/packages/SingleCellExperiment/\n[seriation]: https://cran.r-project.org/package=seriation\n[shapr]: https://cran.r-project.org/package=shapr\n[Sim.DiffProc]: https://cran.r-project.org/package=Sim.DiffProc\n[SimDesign]: https://cran.r-project.org/package=SimDesign\n[stars]: https://cran.r-project.org/package=stars\n[strucchange]: https://cran.r-project.org/package=strucchange\n[sva]: https://bioconductor.org/packages/sva/\n[SuperLearner]: https://cran.r-project.org/package=SuperLearner\n[tm]: https://cran.r-project.org/package=tm\n[vegan]: https://cran.r-project.org/package=vegan\n[BiocParallel]: https://bioconductor.org/packages/BiocParallel/\n[supported future backends]: https://www.futureverse.org/backends.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffutureverse%2Ffuturize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffutureverse%2Ffuturize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffutureverse%2Ffuturize/lists"}