Apply Function to Elements in Parallel using Futures

Implementations of apply(), by(), eapply(), lapply(), Map(), mapply(), replicate(), sapply(), tapply(), and vapply() that can be resolved using any future-supported backend, e.g. parallel on the local machine or distributed on a compute cluster. These future_*apply() functions come with the same pros and cons as the corresponding base-R *apply() functions but with the additional feature of being able to be processed via the future framework.


News

Package: future.apply

Version: 1.2.0 [2019-03-06]

NEW FEATURES:

  • Added future_by().

BUG FIXES:

  • Attributes 'add' and 'ignore' of argument 'future.globals' were ignored although support for them was added in future (>= 1.10.0).

  • Validation of L'Ecuyer-CMRG RNG seeds failed in recent R devel.

Version: 1.1.0 [2019-01-16]

SIGNIFICANT CHANGES:

  • Added argument 'future.stdout' and 'future.conditions' for controlling whether standard output and conditions (e.g. messages and warnings) produced during the evaluation of futures should be captured and relayed or not. Standard output is guaranteed to be relayed in the same order as it would when using sequential processing. Analogously for conditions. However, standard output is always relayed before conditions. Errors are always relayed. Relaying of non-error conditions requires future (>= 1.11.0).

NEW FEATURES:

  • Elements can be processed in random order by setting attribute 'ordering' to "random" of argument 'future.chunk.size' or 'future.scheduling', e.g. future.chunk.size = structure(TRUE, ordering = "random"). This can help improve load balancing in cases where there is a correlation between processing time and ordering of the elements. Note that the order of the returned values is not affected when randomizing the processing order.

  • Swapped order of arguments 'future.lazy' and 'future.seed' to be consistent with ditto arguments of future::future().

Version: 1.0.1 [2018-08-26]

DOCUMENTATION / LICENCE:

  • The license is GPL (>= 2). Previously it was documented as GPL (>= 2.1) but that is a non-existing GPL version.

BUG FIXES:

  • For list objects 'X' where X != as.list(X), future_lapply(X) did not give the same result as lapply(X). Analogously for future_vapply(X).

  • future_mapply() could drop class attribute on elements iterated over, because .subset() was used internally instead of [(). For instance, iteration over Date objects were affected.

Version: 1.0.0 [2018-06-19]

SIGNIFICANT CHANGES:

  • License changed from LGPL (>= 2.1) to GPL (>= 2) to make sure it is compatible with the source code adopted from R base's apply(), Map(), replicate(), sapply(), and tapply(), which are all GPL (>= 2).

NEW FEATURES:

  • Added future_apply(), future_mapply(), and future_Map().

  • Added argument future.chunk.size as an alternative to argument future.scheduling for controlling the average number of elements processed per future ("chunk"). In R 3.5.0, the parallel package introduced argument 'chunk.size'.

  • The maximum total size of globals allowed (option 'future.globals.maxSize') per future ("chunk") is now scaled up by the number of elements processed by the future ("chunk") making the protection approximately invariant to the amount of chunking (arguments 'future.scheduling' and 'future.chunk.size').

BUG FIXES:

  • future_lapply(X, ...) did not search for globals in 'X'.

  • future_vapply() did not return the same dimension names as vapply() when FUN.VALUE had no names but FUN(X[[1]]) had.

SOFTWARE QUALITY:

  • Test code coverage is 100%.

Version: 0.2.0 [2018-05-01]

NEW FEATURES:

  • Added future_eapply(), future_tapply(), future_vapply(), and future_replicate().

Version: 0.1.0 [2018-01-15]

  • Package submitted to CRAN.

Version: 0.0.3 [2017-12-06]

DOCUMENTATION:

  • Vignette now covers the basics of the package and describes its role in the R package ecosystem together with a road map going forward.

SOFTWARE QUALITY:

  • Added more package tests. Code coverage is currently at 100%.

Version: 0.0.2 [2017-12-06]

NEW FEATURES:

  • PERFORMANCE: future_lapply(x, ...) is now much faster and more memory efficient for large 'x' vectors because it uses internal fold() function that is more efficient (memory and speed) version of base::Reduce(f, x), especially when length(x) is large.

Version: 0.0.0-9000 [2017-08-31]

NEW FEATURES:

  • Added future_sapply().

  • Added future_lapply() - originally from the future package.

  • Created package.

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("future.apply")

1.2.0 by Henrik Bengtsson, 20 days ago


https://github.com/HenrikBengtsson/future.apply


Report a bug at https://github.com/HenrikBengtsson/future.apply/issues


Browse source code at https://github.com/cran/future.apply


Authors: Henrik Bengtsson [aut, cre, cph] , R Core Team [cph, ctb]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports globals

Depends on future

Suggests datasets, stats, tools, listenv, R.rsp, markdown


Imported by BAMBI, GSODR, R.filesets, RTransferEntropy, drtmle, fxtract, kernelboot, origami, phylolm, rangeMapper, robotstxt, sperrorest.

Suggested by DeclareDesign, future.BatchJobs, future.batchtools, future.callr, grattan, lgr, penaltyLearning.


See at CRAN