Learn R Programming

⚠️There's a newer version (1.34.0) of this package.Take me there.

future (version 0.11.0)

A Future API for R

Description

A Future API for R is provided. In programming, a future is an abstraction for a value that may be available at some point in the future. The state of a future can either be unresolved or resolved. As soon as it is resolved, the value is available. Futures are useful constructs in for instance concurrent evaluation, e.g. parallel processing and distributed processing on compute clusters. The purpose of this package is to provide a lightweight interface for using futures in R. Functions 'future()' and 'value()' exist for creating futures and requesting their values, e.g. 'f <- future({ mandelbrot(c(0.28,0), side=2) })' and 'v <- value(f)'. The 'resolve()' function can be used to check if a future is resolved or not. An infix assignment operator '%<=%' exists for creating futures whose values are accessible by the assigned variables (as promises), e.g. 'v %<=% { mandelbrot(c(0.28,0), side=2) }'. This package implements synchronous "lazy" and "eager" futures, and asynchronous "multicore", "multisession" and ad hoc "cluster" futures. Additional types of futures are provided by other packages enhancing this package.

Copy Link

Version

Install

install.packages('future')

Monthly Downloads

220,923

Version

0.11.0

License

LGPL (>= 2.1)

Issues

Pull Requests

Stars

Forks

Last Published

January 20th, 2016

Functions in future (0.11.0)

%plan%

Use a specific plan for a future assignment
futureAssign

Create a future and assign its value to a variable as a promise
requestCore

Request a core for multicore processing
value.Future

The value of a future
resolve

Wait until all existing futures in an environment are resolved
availableCores

Get number of available cores on current machine
LazyFuture-class

A lazy future is a future whose value will be resolved at the time when it is requested
ClusterFuture-class

An cluster future is a future whose value will be resolved asynchroneously in a parallel process
multisession

Create a multisession future whose value will be resolved asynchroneously in a parallel R session
lazy

Create a lazy future whose value will be resolved at the time when requested
multicore

Create a multicore future whose value will be resolved asynchroneously in a forked parallel process
values

Gets all values in an object
MulticoreFuture-class

An multicore future is a future whose value will be resolved asynchroneously in a parallel process
resolved

Check whether a future is resolved or not
Future-class

A future represents a value that will be available at some point in the future
usedCores

Get number of cores currently used
eager

Create an eager future whose value will be resolved immediately
cluster

Create a cluster future whose value will be resolved asynchroneously in a parallel process
plan

Plan how to resolve a future
future

Create a future
futures

Gets all futures in an object
futureOf

Get the future of a future variable
injectNextStrategy

Inject code for the next type of future to use for nested futures
supportsMulticore

Check whether multicore processing is supported or not
EagerFuture-class

An eager future is a future whose value will be resolved immediately