Skip to content

%dorng% does not work unless the 'foreach' package is attached #18

@HenrikBengtsson

Description

@HenrikBengtsson

%dorng% does not work unless the 'foreach' package is attached. This becomes a problem for packages who want to use 'foreach' and 'doRNG' internally without attaching those packages. The workaround for such packages is to also import %dopar% from 'foreach' even if they never use it.

A minimal example:

`%dorng%` <- doRNG::`%dorng%`
y <- foreach::foreach(x=1:2) %dorng% x
## Error in list(args = (1:2)(.doRNG.stream = list(c(10407L, -255388091L,  : 
##  could not find function "%dopar%"

A similar do.call() problem was reported in Issue #13, which was fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions