Skip to content

Bug? "verbose" argument changes output of foreach() function #45

@jmbh

Description

@jmbh

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions