[R] R CMD check and foreach code

2014-03-27 Thread Jannis
Dear R users, I have created a package and would like to check it for CRAN/R-Forge submission. I use some parallelized code with the help of foreach and doMC. R CMD check now gives me a warning even though my code is correctly programmed (at least I think that it is). The following dummy

Re: [R] R CMD check and foreach code

2014-03-27 Thread Duncan Murdoch
On 27/03/2014 10:29 AM, Jannis wrote: Dear R users, I have created a package and would like to check it for CRAN/R-Forge submission. I use some parallelized code with the help of foreach and doMC. R CMD check now gives me a warning even though my code is correctly programmed (at least I think

Re: [R] R CMD check and foreach code

2014-03-27 Thread Jannis
On 27.03.2014 15:58, Duncan Murdoch wrote: I would use a slightly less dirty hack: call globalVariables() to declare that i is global. The foreach() function is using nonstandard evaluation to make this work, and codetools (that does the checks) doesn't know all the ins and outs of it.

Re: [R] R CMD check and foreach code

2014-03-27 Thread Duncan Murdoch
On 27/03/2014 12:46 PM, Jannis wrote: On 27.03.2014 15:58, Duncan Murdoch wrote: I would use a slightly less dirty hack: call globalVariables() to declare that i is global. The foreach() function is using nonstandard evaluation to make this work, and codetools (that does the checks)