foreach
Provides Foreach Looping Construct
Description
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.
Downloads
294.4K
Last 30 days
199th
941.9K
Last 90 days
3.7M
Last year
Trend: -6.5% (30d vs prior 30d)
6.4K
Last 30 days
17.2K
Last 90 days
50K
Last year
Trend: +30.2% (30d vs prior 30d)
CRAN Check Status
Show all 13 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | ERROR |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (1 non-OK)
re-building of vignette outputs
Error(s) in re-building vignettes: --- re-building ‘foreach.Rmd’ using rmarkdown --- finished re-building ‘foreach.Rmd’ --- re-building ‘nested.Rmd’ using rmarkdown Error: processing vignette 'nested.Rmd' failed with diagnostics: there is no package called ‘htmltools’ --- failed re-building ‘nested.Rmd’ SUMMARY: processing the following file failed: ‘nested.Rmd’ Error: Vignette re-building failed. Execution halted
Check History
ERROR 12 OK · 1 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 10, 2026
re-building of vignette outputs
Error(s) in re-building vignettes: --- re-building ‘foreach.Rmd’ using rmarkdown --- finished re-building ‘foreach.Rmd’ --- re-building ‘nested.Rmd’ using rmarkdown Error: processing vignette 'nested.Rmd' failed with diagnostics: there is no package called ‘htmltools’ --- failed re-building ‘nested.Rmd’ SUMMARY: processing the following file failed: ‘nested.Rmd’ Error: Vignette re-building failed. Execution halted
package dependencies
Package suggested but not available for checking: 'doMC'