foreach: Provides Foreach Looping Construct for R

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.

Version: 1.4.3
Depends: R (≥ 2.5.0)
Imports: codetools, utils, iterators
Suggests: randomForest
Enhances: compiler, doMC, RUnit, doParallel
Published: 2015-10-13
Author: Rich Calaway [cre], Revolution Analytics [aut, cph], Steve Weston [aut]
Maintainer: Rich Calaway <richcala at>
License: Apache License (== 2.0)
NeedsCompilation: no
Materials: NEWS
In views: HighPerformanceComputing
CRAN checks: foreach results


Reference manual: foreach.pdf
Vignettes: foreach Manual
Nesting Foreach Loops
Package source: foreach_1.4.3.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
OS X Snow Leopard binaries: r-release: foreach_1.4.2.tgz, r-oldrel: foreach_1.4.2.tgz
OS X Mavericks binaries: r-release: foreach_1.4.3.tgz
Old sources: foreach archive

Reverse dependencies:

Reverse depends: BANFF, biganalytics, clustvarsel, DNMF, doMC, doMPI, doParallel, doRedis, doRNG, doSNOW, GA, gam, gamsel, GenCAT, glmnet, gpmap, hdlm, hzar, iFes, localgauss, MAVTgsa, MetaPCA, MetaQC, missForest, multicon, parfossil, PAWL, penDvine, permGPU, perspectev, PortfolioAnalytics, QuantumClone, randomGLM, remote, Rlof, s4vd, sdcTarget, SDDE, selfingTree, sms,, SurvRank, survSNP, turboEM, unbalanced, vacem, VTrack
Reverse imports: ApacheLogProcessor, arqas, bayou, bcRep, bdots, bigrf, blowtorch, boostr, breakpoint, BSGW, caret, Causata, covmat, D2C, Directional, EasyMARK, EFDR, ENMeval, enpls, EnsembleBase, EpiModel, ezsim, fdasrvf, gdalUtils, GENLIB, gimme, GWLelast, hbm, hdnom, HighDimOut, icenReg, iLaplace, Information, JBTools, LANDD, ldamatch, lfl, lint, Mediana, Morpho, mplot, mvcwt, myTAI, NMF, opentraj, parallelML, parallelSVM, ParetoPosStable, pec, performanceEstimation, polywog, primerTree, prospectr, proteomics, prozor, randomUniformForest, regRSM, resemble, reval, RobustEM, rplexos, RRreg, RSNPset, RStoolbox, rusda, semsfa, SGP, SimDesign, simPop, siRSM, spacom, spectral.methods, sperich, StAMPP, taxize, TED, timeSeq, toaster, tsDyn, TSMining, TSP, vardpoor, VSURF, WGCNA, YaleToolkit, ykmeans
Reverse suggests: BayesFactor, Bclim, data.tree, dcGOR, DEoptim, DiceKriging, dnet, dplR, EGRETci, evolqg, eyetrackingR, FinancialInstrument, fitTetra, fxregime, GMCM, harvestr, Interatrix, itertools, kselection, lava, msm, neuroim, pbo, phenex, plyr, protr, ptycho, ripa, rpg, simsalapar, ss3sim, strucchange, tmlenet, treatSens