Install 'Futureverse' in One Go

The 'Futureverse' is a set of packages for parallel and distributed processing with the 'future' package at its core (Bengtsson, 2021, ). Another notable component is the 'futurize' package (Bengtsson, 2026, ) for turning common sequential calls into parallel ones via a single function futurize(). Similarly, the progressify() of the 'progressify' package makes common calls to report of progress. This package is designed to make it easy to install common 'Futureverse' packages in a single step. This package is intended for end-users, interactive use, and R scripts. Packages must not list it as a dependency - instead, explicitly declare each 'Futureverse' package as a dependency as needed.


R package 'futureverse' - Install 'Futureverse' in One Go The 'future' hexlogo

The Futureverse is a unifying framework for parallelization and distributed processing in R. This package, futureverse, is a utility wrapper package that makes it easy to install most common Futureverse packages in one go.

TL;DR

Start by configuring Futureverse to parallelize on the current computer:

future::plan(future::multisession)

After this, all it takes is a minor tweak to make your existing lapply(), map(), or foreach() code to run in parallel, e.g.

library(futurize)

## Sequential and parallel version of base R apply
y <- lapply(X, slow_fcn)
y <- lapply(X, slow_fcn) |> futurize()

## Sequential and parallel version of purrr map
library(purrr)
y <- X |> map(slow_fcn)
y <- X |> map(slow_fcn) |> futurize()

## Sequential and parallel version of foreach
library(foreach)
y <- foreach(x = X) %do% slow_fcn(x)
y <- foreach(x = X) %do% slow_fcn(x) |> futurize()

To get progress updates, add a |> progressify(), e.g.

library(progressify)
handlers(global = TRUE)

y <- lapply(X, slow_fcn) |> progressify() |> futurize()
y <- X |> map(slow_fcn) |> progressify() |> futurize()
y <- foreach(x = X) %do% slow_fcn(x) |> progressify() |> futurize()

Installation

Call:

install.packages("futureverse")

to install the two main go-to packages:

  • futurize - parallelize common map-reduce and domain-specific function calls
  • progressify - report on progress for common map-reduce and domain-specific function

together with support packages:

  • future - the core Futureverse package
  • progressr - Near-live progress updates when using Futureverse
  • future.apply - Futureverse variants of base-R apply functions
  • furrr - Futureverse variants of purrr apply functions
  • doFuture - Futureverse adaptors for the foreach package

Call:

install.packages("futureverse", dependencies = TRUE)

to install also additional parallel backends:

Want to learn more?

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("futureverse")

0.3.0 by Henrik Bengtsson, 4 months ago


https://www.futureverse.org, https://github.com/futureverse/futureverse/


Report a bug at https://github.com/futureverse/futureverse/issues


Browse source code at https://github.com/cran/futureverse


Authors: Henrik Bengtsson [aut, cre, cph] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports future, futurize, future.apply, furrr, doFuture, progressify, progressr

Suggests future.batchtools, future.callr, future.mirai, RhpcBLASctl


See at CRAN