foreach
foreach copied to clipboard
Bug? "verbose" argument changes output of foreach() function
Reproducible example:
v_out2 <- foreach(i = 1:nIter, verbose=TRUE, .combine = 'c') %do% { set.seed(i) data <- rnorm(1) return( mean(data)) } v_out2 [1] -0.6264538
I get the same for "verbose=FALSE". However, if I don't specify "verbose" at all I get:
v_out2 <- foreach(i = 1:nIter, .combine = 'c') %do% { set.seed(i) data <- rnorm(1) return( mean(data)) }
v_out2 [1] -0.62645381 -0.89691455 -0.96193342 0.21675486 -0.84085548 [6] 0.26960598 2.28724716 -0.08458607 -0.76679604 0.01874617
as I should.
I am using the latest version from CRAN (foreach_1.5.2).
It's .verbose
not verbose
.