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

:rocket: R package: future.apply - Apply Function to Elements in Parallel using Futures

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

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.6%) to scientific vocabulary

Keywords

asynchronous distributed-computing future hpc hpc-clusters package parallel parallel-computing parallel-processing parallelization programming r
Last synced: 6 months ago · JSON representation

Repository

:rocket: R package: future.apply - Apply Function to Elements in Parallel using Futures

Basic Info
Statistics
  • Stars: 218
  • Watchers: 8
  • Forks: 18
  • Open Issues: 21
  • Releases: 0
Topics
asynchronous distributed-computing future hpc hpc-clusters package parallel parallel-computing parallel-processing parallelization programming r
Created over 8 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog Contributing

README.md

CRAN check status R CMD check status Coverage Status

future.apply: Apply Function to Elements in Parallel using Futures

Introduction

The purpose of this package is to provide worry-free parallel alternatives to base-R "apply" functions, e.g. apply(), lapply(), and vapply(). The goal is that one should be able to replace any of these in the core with its futurized equivalent and things will just work. For example, instead of doing: r library(datasets) library(stats) y <- lapply(mtcars, FUN = mean, trim = 0.10) one can do: ```r library(future.apply) plan(multisession) ## Run in parallel on local computer

library(datasets) library(stats) y <- future_lapply(mtcars, FUN = mean, trim = 0.10) ```

Reproducibility is part of the core design, which means that perfect, parallel random number generation (RNG) is supported regardless of the amount of chunking, type of load balancing, and future backend being used. To enable parallel RNG, use argument future.seed = TRUE.

Role

Where does the future.apply package fit in the software stack? You can think of it as a sibling to foreach, furrr, BiocParallel, plyr, etc. Just as parallel provides parLapply(), foreach provides foreach(), BiocParallel provides bplapply(), and plyr provides llply(), future.apply provides future_lapply(). Below is a table summarizing this idea:

Package Functions Backends
future.apply

Future-versions of common goto *apply() functions available in base R (of the base and stats packages):
future_apply(), future_by(), future_eapply(), future_Filter(), future_lapply(), future_kernapply(), future_Map(), future_mapply(), future_.mapply(), future_replicate(), future_sapply(), future_tapply(), and future_vapply().
The following function is not implemented:
future_rapply()
All future backends
parallel mclapply(), mcmapply(), clusterMap(), parApply(), parLapply(), parSapply(), ... Built-in and conditional on operating system
foreach foreach(), times() All future backends via doFuture
furrr future_imap(), future_map(), future_pmap(), future_map2(), ... All future backends
BiocParallel Bioconductor's parallel mappers:
bpaggregate(), bpiterate(), bplapply(), and bpvec()
All future backends via doFuture (because it supports foreach) or via BiocParallel.FutureParam (direct BiocParallelParam support; prototype)
plyr **ply(..., .parallel = TRUE) functions:
aaply(), ddply(), dlply(), llply(), ...
All future backends via doFuture (because it uses foreach internally)

Note that, except for the built-in parallel package, none of these higher-level APIs implement their own parallel backends, but they rather enhance existing ones. The foreach framework leverages backends such as doParallel, doMC and doFuture, and the future.apply framework leverages the future ecosystem and therefore backends such as built-in parallel, future.callr, and future.batchtools.

By separating future_lapply() and friends from the future package, it helps clarifying the purpose of the future package, which is to define and provide the core Future API, which higher-level parallel APIs can build on and for which any futurized parallel backends can be plugged into.

The API and identity of the future.apply package will be kept close to the *apply() functions in base R. In other words, it will neither keep growing nor be expanded with new, more powerful apply-like functions beyond those core ones in base R. Such extended functionality should be part of a separate package.

Installation

R package future.apply is available on CRAN and can be installed in R as: r install.packages("future.apply")

Pre-release version

To install the pre-release version that is available in Git branch develop on GitHub, use: r remotes::install_github("futureverse/future.apply", ref="develop") This will install the package from source.

Contributing

To contribute to this package, please see CONTRIBUTING.md.

Owner

  • Name: Futureverse
  • Login: futureverse
  • Kind: organization

A Unifying Parallelization Framework in R for Everyone

GitHub Events

Total
  • Issues event: 2
  • Watch event: 9
  • Issue comment event: 4
  • Pull request event: 1
  • Fork event: 2
Last Year
  • Issues event: 2
  • Watch event: 9
  • Issue comment event: 4
  • Pull request event: 1
  • Fork event: 2

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 505
  • Total Committers: 5
  • Avg Commits per committer: 101.0
  • Development Distribution Score (DDS): 0.016
Past Year
  • Commits: 75
  • Committers: 2
  • Avg Commits per committer: 37.5
  • Development Distribution Score (DDS): 0.013
Top Committers
Name Email Commits
Henrik Bengtsson hb@a****g 497
BHGC Website GHA Workflow Runner b****h@b****g 5
Yunuuuu y****6@o****m 1
Hugo Gruson B****o 1
Clark Fitzgerald c****g@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 100
  • Total pull requests: 5
  • Average time to close issues: 9 months
  • Average time to close pull requests: 1 day
  • Total issue authors: 59
  • Total pull request authors: 5
  • Average comments per issue: 3.77
  • Average comments per pull request: 1.6
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 4
  • Pull requests: 1
  • Average time to close issues: about 1 month
  • Average time to close pull requests: about 2 hours
  • Issue authors: 4
  • Pull request authors: 1
  • Average comments per issue: 3.0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • HenrikBengtsson (28)
  • mllg (4)
  • arunsrinivasan (4)
  • waynelapierre (4)
  • odelmarcelle (2)
  • ThoDuyNguyen (2)
  • DavisVaughan (2)
  • rickhelmus (2)
  • dipterix (2)
  • magic-lantern (1)
  • renkun-ken (1)
  • mb706 (1)
  • Kodiologist (1)
  • comicfans (1)
  • vsrdharca (1)
Pull Request Authors
  • Yunuuuu (2)
  • Bisaloo (1)
  • shikokuchuo (1)
  • MINATILO (1)
  • odelmarcelle (1)
Top Labels
Issue Labels
feature request (18) bug (13) question (11) globals (6) for-future-pkg (5) documentation (3) RNG (3) enhancement (3) pkg-test-needed (2) invalid (1) help wanted (1) for-globals-pkg (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 220,284 last-month
  • Total docker downloads: 34,020,227
  • Total dependent packages: 150
  • Total dependent repositories: 265
  • Total versions: 20
  • Total maintainers: 1
cran.r-project.org: future.apply

Apply Function to Elements in Parallel using Futures

  • Versions: 20
  • Dependent Packages: 150
  • Dependent Repositories: 265
  • Downloads: 220,284 Last month
  • Docker Downloads: 34,020,227
Rankings
Dependent packages count: 0.7%
Downloads: 0.8%
Dependent repos count: 1.0%
Stargazers count: 2.1%
Average: 4.5%
Forks count: 4.9%
Docker downloads count: 17.3%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.2.0 depends
  • future >= 1.26.1 depends
  • globals >= 0.15.1 imports
  • parallel * imports
  • utils * imports
  • R.rsp * suggests
  • datasets * suggests
  • listenv >= 0.8.0 suggests
  • markdown * suggests
  • stats * suggests
  • tools * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/covr.yaml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite