future: A Future API for R

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(-0.75, 0, side=3) })' and 'v <- value(f)'. The 'resolved()' 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(-0.75, 0, side=3) }'. This package implements synchronous "lazy" and "eager" futures, and asynchronous "multicore", "multisession" and ad hoc "cluster" futures. Globals variables and functions are automatically identified and exported. Required packages are attached in external R sessions whenever needed. All types of futures are designed to behave the same such that the exact same code work regardless of futures used or number of cores, background sessions or cluster nodes available. Additional types of futures are provided by other packages enhancing this package.

Author
Henrik Bengtsson [aut, cre, cph]
Date of publication
2016-11-12 14:02:40
Maintainer
Henrik Bengtsson <henrikb@braju.com>
License
LGPL (>= 2.1)
Version
1.2.0
URLs

View on CRAN

Man pages

as.cluster
Coerce an object to a cluster object
availableCores
Get number of available cores on current machine
backtrace
Back trace the expressions evaluated before a condition was...
cluster
Create a cluster future whose value will be resolved...
ClusterFuture-class
A cluster future is a future whose value will be resolved...
ConstantFuture-class
A future with a constant value
eager
Create a uniprocess future whose value will be in the current...
flapply
Apply a Function over a List or Vector via Futures
future
Create a future
Future-class
A future represents a value that will be available at some...
FutureError
An error occurred while trying to evaluate a future
futureOf
Get the future of a future variable
future.options
Options used for futures
futures
Gets all futures in an object
getExpression
Inject code for the next type of future to use for nested...
getGlobalsAndPackages
Retrieves global variables of an expression and their...
grapes-globals-grapes
Specify globals for a future assignment
grapes-label-grapes
Specify label for a future assignment
grapes-plan-grapes
Use a specific plan for a future assignment
grapes-tweak-grapes
Temporarily tweaks the arguments of the current strategy
makeClusterPSOCK
Create a Parallel Socket Cluster
mandelbrot
Mandelbrot convergence counts
multicore
Create a multicore future whose value will be resolved...
MulticoreFuture-class
An multicore future is a future whose value will be resolved...
multiprocess
Create a multiprocess future whose value will be resolved...
MultiprocessFuture-class
An multiprocess future is a future whose value will be...
multisession
Create a multisession future whose value will be resolved...
nbrOfWorkers
Gets the number of workers available
plan
Plan how to resolve a future
remote
Create a remote future whose value will be resolved...
requestCore
Request a core for multicore processing
resolve
Wait until all existing futures in an environment are...
resolved
Check whether a future is resolved or not
run
Run a future
sessionDetails
Outputs details on the current R session
supportsMulticore
Check whether multicore processing is supported or not
tweak
Tweaks a future function by adjusting its default arguments
UniprocessFuture-class
An uniprocess future is a future whose value will be resolved...
usedCores
Get number of cores currently used
value
The value of a future
values
Gets all values in an object

Files in this package

future
future/inst
future/inst/vignettes-static
future/inst/vignettes-static/incl
future/inst/vignettes-static/incl/future-1-overview-example3.R
future/inst/vignettes-static/incl/future-1-overview-example2.R
future/inst/doc
future/inst/doc/future-4-startup.html
future/inst/doc/future-3-topologies.html
future/inst/doc/future-2-issues.md.rsp
future/inst/doc/future-2-issues.html
future/inst/doc/future-3-topologies.md.rsp
future/inst/doc/future-1-overview.html
future/inst/doc/future-4-startup.md.rsp
future/tests
future/tests/as.cluster.R
future/tests/futures.R
future/tests/utils.R
future/tests/globals,manual.R
future/tests/future,labels.R
future/tests/mandelbrot.R
future/tests/rng.R
future/tests/nested_futures.R
future/tests/resolve.R
future/tests/multicore.R
future/tests/eager.R
future/tests/whichIndex.R
future/tests/futureAssign.R
future/tests/sessionDetails.R
future/tests/early-signaling.R
future/tests/constant.R
future/tests/globals,NSE.R
future/tests/globals,subassignment.R
future/tests/dotdotdot.R
future/tests/lazy.R
future/tests/transparent.R
future/tests/globals,toolarge.R
future/tests/backtrace.R
future/tests/remote.R
future/tests/globals,resolve.R
future/tests/Future-class.R
future/tests/nbrOfWorkers.R
future/tests/future.R
future/tests/requestNode.R
future/tests/tweak.R
future/tests/multiprocess.R
future/tests/flapply.R
future/tests/futureOf_with_environment.R
future/tests/startup.R
future/tests/availableCores.R
future/tests/FutureRegistry.R
future/tests/deprecated.R
future/tests/incl
future/tests/incl/start,load-only.R
future/tests/incl/end.R
future/tests/incl/start.R
future/tests/globalsOf,tweaks.R
future/tests/cluster.R
future/tests/futureAssign_OP_with_listenv.R
future/tests/FutureError.R
future/tests/demo.R
future/tests/globals,tricky.R
future/tests/requestCore.R
future/tests/futureCall.R
future/tests/nested_futures,mc.cores.R
future/tests/ClusterRegistry.R
future/tests/globals,formulas.R
future/tests/multisession.R
future/tests/uuid.R
future/tests/futureOf_with_listenv.R
future/tests/futureAssign_OP_with_environment.R
future/tests/plan.R
future/tests/futureOf.R
future/tests/invalid-owner.R
future/tests/futureAssign_OP.R
future/NAMESPACE
future/demo
future/demo/fibonacci.R
future/demo/mandelbrot.R
future/demo/00Index
future/NEWS
future/R
future/R/as.cluster.R
future/R/uniprocess.R
future/R/futures.R
future/R/utils.R
future/R/mandelbrot.R
future/R/zzz.plan.R
future/R/ClusterFuture-class.R
future/R/values.R
future/R/resolved.R
future/R/resolve.R
future/R/multicore.R
future/R/signalEarly.R
future/R/whichIndex.R
future/R/futureAssign.R
future/R/sessionDetails.R
future/R/MultiprocessFuture-class.R
future/R/constant.R
future/R/globals.R
future/R/backtrace.R
future/R/remote.R
future/R/Future-class.R
future/R/nbrOfWorkers.R
future/R/future.R
future/R/globals_OP.R
future/R/tweak.R
future/R/tweakExpression.R
future/R/multiprocess.R
future/R/flapply.R
future/R/options.R
future/R/availableCores.R
future/R/FutureRegistry.R
future/R/cluster.R
future/R/FutureError-class.R
future/R/UniprocessFuture-class.R
future/R/ConstantFuture-class.R
future/R/MulticoreFuture-class.R
future/R/futureCall.R
future/R/ClusterRegistry.R
future/R/label_OP.R
future/R/multisession.R
future/R/plan_OP.R
future/R/makeClusterPSOCK.R
future/R/zzz.R
future/R/tweak_OP.R
future/R/futureOf.R
future/R/MultisessionFuture-class.R
future/R/futureAssign_OP.R
future/vignettes
future/vignettes/future-2-issues.md.rsp
future/vignettes/future-3-topologies.md.rsp
future/vignettes/future-4-startup.md.rsp
future/MD5
future/build
future/build/vignette.rds
future/DESCRIPTION
future/man
future/man/ClusterFuture-class.Rd
future/man/value.Rd
future/man/run.Rd
future/man/getExpression.Rd
future/man/sessionDetails.Rd
future/man/usedCores.Rd
future/man/resolved.Rd
future/man/MulticoreFuture-class.Rd
future/man/multisession.Rd
future/man/backtrace.Rd
future/man/values.Rd
future/man/cluster.Rd
future/man/multiprocess.Rd
future/man/remote.Rd
future/man/futureOf.Rd
future/man/getGlobalsAndPackages.Rd
future/man/as.cluster.Rd
future/man/plan.Rd
future/man/multicore.Rd
future/man/grapes-tweak-grapes.Rd
future/man/MultiprocessFuture-class.Rd
future/man/flapply.Rd
future/man/futures.Rd
future/man/grapes-globals-grapes.Rd
future/man/availableCores.Rd
future/man/requestCore.Rd
future/man/makeClusterPSOCK.Rd
future/man/ConstantFuture-class.Rd
future/man/FutureError.Rd
future/man/tweak.Rd
future/man/Future-class.Rd
future/man/resolve.Rd
future/man/nbrOfWorkers.Rd
future/man/eager.Rd
future/man/future.options.Rd
future/man/future.Rd
future/man/mandelbrot.Rd
future/man/grapes-plan-grapes.Rd
future/man/supportsMulticore.Rd
future/man/UniprocessFuture-class.Rd
future/man/grapes-label-grapes.Rd