Skip to content

foreach

1.5.2

Provides Foreach Looping Construct

1,041packages depend
3.8Mdownloads / year
70.1%test coverage
12/13checks pass

Overview

About
Maintained by Folashade DanielFirst published 2009-06-2716 releasesCRAN page ↗GitHub ↗

Support for the foreach looping construct. Foreach is an idiom that allows for iterating over elements in a collection, without the use of an explicit loop counter. This package in particular is intended to be used for its return value, rather than for its side effects. In that sense, it is similar to the standard lapply function, but doesn't require the evaluation of a function. Using foreach without side effects also facilitates executing the loop in parallel.

Install

Health

CRAN checks
1ERROR12OK
Failing flavors
  • ERROR r-oldrel-macos-x86_64
Slowest check: 2.9 min · r-oldrel-windows-x86_64
Code health
Yes
Tests · ratio 0.27
70.1%
Coverage · measured lines
87%
Documentation · exports
3
Dependencies · direct
Check history
  • ERROR2026-03-10
    12 OK · 1 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 156 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
88%
Return-value docs
0%
References docs
0%

Downloads

3.8M
CRAN downloads in the past year
Rank #194 · ~10.4K/day · ~315.8K/mo
Daily download trend is not available in this view yet.
279.8K30 days
886K90 days
3.8M1 year
Compare downloads with other packages →
Also on70.2K r2u109 autocran408.5K conda_forge15.2K c2d4u

Repository

Repository
56Stars
4Forks
22Open issues
5Open PRs
0Releases
86Commits
7Contributors
rforeachparallel-computing
License Apache-2.0 · 86 commits · Last activity 2024-02-13 · 0% stars, 30d

Stars over time

2025-07-27 · 542026-07-07 · 56

Repository practices

Upstream repositoryBeta

3 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/revolutionanalytics/foreach on 2026-08-09.

Continuous integration (1)
GitHub Actions
CRAN release process (1)
revdep/
Lint, format, editor (1)
VS Code
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
7 external dependencies (excludes base and recommended)
Depends (1)
R >= 2.5.0
Imports (3)
codetoolsutilsiterators
LinkingTo (0)
none
Enhances (0)
none

Code & Tests

People & History

People (5)
Maintainer (1)
Maintainer · added in 1.5.2
Authors (2)
Author, Copyright holder · added in 1.4.4
Author · added in 1.4.1
Contributors (2)
Contributor · added in 1.4.3
Contributor · added in 1.4.7
Copyright holders (1)
Author, Copyright holder · added in 1.4.4
Listed in earlier versions (3)
no longer listed · 1.2.0-1 to 1.3.0
no longer listed · 1.3.2 to 1.4.3
no longer listed · 1.5.1
Package Timeline

16 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • 1.5.2Latest
    2022-02-02 · current release · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 1.5.1
    2020-10-15 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 1.5.0
    2020-03-30 · diff ↗
  • 1.4.8
    2020-02-09 · diff ↗
  • 1.4.7
    2019-07-28 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • 1.4.4
    2017-12-12 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
Show 21 earlier events
  • R
    R 3.3.0 released · 2016-05-03
  • 1.4.3
    2015-10-13 · diff ↗
  • R
    R 3.2.0 released · 2015-04-16
  • 1.4.2
    2014-04-11 · diff ↗
  • R
    R 3.1.0 released · 2014-04-10
  • 1.4.1
    2013-06-06 · diff ↗
  • R
    R 3.0.0 released · 2013-04-03
  • 1.4.0
    2012-04-16 · diff ↗
  • R
    R 2.15.0 released · 2012-03-30
  • 1.3.5
    2012-03-14 · diff ↗
  • 1.3.4
    2012-03-13 · diff ↗
  • R
    R 2.14.0 released · 2011-10-31
  • 1.3.2
    2011-05-20 · diff ↗
  • R
    R 2.13.0 released · 2011-04-13
  • R
    R 2.12.0 released · 2010-10-15
  • R
    R 2.11.0 released · 2010-04-22
  • R
    R 2.10.0 released · 2009-10-26
  • 1.3.0
    2009-10-06 · diff ↗
  • 1.2.1
    2009-06-30 · diff ↗
  • 1.2.0-1
    2009-06-27
  • R
    R 2.9.0 released · 2009-04-17

Package metadata

First published
2009-06-27
Total releases
16 / 17 yrs
License
Apache License (== 2.0)
Minimum R
≥ 2.5.0
Download size
88 KB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("foreach")
Daniel, F., Microsoft, Calaway, R., Ooi, H., & Weston, S. (2022). foreach: Provides Foreach Looping Construct (Version 1.5.2) [Computer software]. https://doi.org/10.32614/CRAN.package.foreach

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for foreach version 1.5.2 [Data set]. HJJB, LLC. Data release v2026-08-15. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-15, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy