Hi, I'm trying to submit my first package which depends on doParallel: Depends: R (>= 3.0), igraph, doParallel Running hadley devtools: devtools::check() and devtools::release() result in no problem (no ERROR nor NOTE on Linux, Mac and Windows). However, when in use the devtools::build_win() command, it results in the following note: * checking R code for possible problems ... NOTE complete_network: no visible global function definition for '%dopar%' complete_network: no visible global function definition for '%:%' complete_network: no visible global function definition for 'foreach' sample_network: no visible global function definition for '%dopar%' sample_network: no visible global function definition for 'foreach' Googling for " no visible global function definition for '%dopar%' " result in a few CRAN packages with similar note e.g. http://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/penDvine-00check.html 1) Is there a special way to include the doParallel package so that this error do not occur? 2) Installing the doParallel package "before" running any test on windows seems to remove this note. Is there any way to specify it in the DESCRIPTION? Best regards, Have a nice day. -- Etienne Lord, Ph.D. Post-Doc Bioinformatics. Universit? du Qu?bec ? Montr?al Universit? de Montr?al [[alternative HTML version deleted]]
On Thu, 2015-03-05 at 18:03 -0500, Etienne Lord wrote:> Hi, > > I'm trying to submit my first package which depends on doParallel: > > Depends: R (>= 3.0), igraph, doParalleladd foreach to your Depends. That should resolve the error you're seeing.> Running hadley devtools: devtools::check() and devtools::release() result > in no problem (no ERROR nor NOTE on Linux, Mac and Windows). > > However, when in use the devtools::build_win() command, it results in the > following note: > > * checking R code for possible problems ... NOTE > > complete_network: no visible global function definition for '%dopar%' > complete_network: no visible global function definition for '%:%' > complete_network: no visible global function definition for 'foreach'<...>> 2) Installing the doParallel package "before" running any test on windows > seems to remove this note. Is there any way to specify it in the > DESCRIPTION?-- Brian G. Peterson http://braverock.com/brian/ Ph: 773-459-4973 IM: bgpbraverock
On 05/03/2015 6:03 PM, Etienne Lord wrote:> Hi, > > I'm trying to submit my first package which depends on doParallel: > > Depends: R (>= 3.0), igraph, doParallelIt's much better to import what you need. If someone calls one of your functions using :: notation, it will fail, because it won't know where to find the doParallel objects.> > Running hadley devtools: devtools::check() and devtools::release() result > in no problem (no ERROR nor NOTE on Linux, Mac and Windows). > > However, when in use the devtools::build_win() command, it results in the > following note: > > * checking R code for possible problems ... NOTE > > complete_network: no visible global function definition for '%dopar%' > complete_network: no visible global function definition for '%:%' > complete_network: no visible global function definition for 'foreach' > sample_network: no visible global function definition for '%dopar%' > sample_network: no visible global function definition for 'foreach' > > Googling for " no visible global function definition for '%dopar%' " result > in a few CRAN packages with > similar note e.g. > http://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/penDvine-00check.html > > 1) Is there a special way to include the doParallel package so that this > error do not occur?List it in the DESCRIPTION as "Imports: doParallel" and in your NAMESPACE file import the functions you need.> > 2) Installing the doParallel package "before" running any test on windows > seems to remove this note. Is there any way to specify it in the > DESCRIPTION?That's a problem with testing within a session. It's best to run checks on a vanilla system, using R CMD check. Duncan Murdoch
On 05/03/2015 6:16 PM, Brian G. Peterson wrote:> On Thu, 2015-03-05 at 18:03 -0500, Etienne Lord wrote: >> Hi, >> >> I'm trying to submit my first package which depends on doParallel: >> >> Depends: R (>= 3.0), igraph, doParallel > > add foreach to your Depends. That should resolve the error you're > seeing.Please don't do that. Use Imports. Duncan Murdoch> > >> Running hadley devtools: devtools::check() and devtools::release() result >> in no problem (no ERROR nor NOTE on Linux, Mac and Windows). >> >> However, when in use the devtools::build_win() command, it results in the >> following note: >> >> * checking R code for possible problems ... NOTE >> >> complete_network: no visible global function definition for '%dopar%' >> complete_network: no visible global function definition for '%:%' >> complete_network: no visible global function definition for 'foreach' > > <...> > >> 2) Installing the doParallel package "before" running any test on windows >> seems to remove this note. Is there any way to specify it in the >> DESCRIPTION? >
Seemingly Similar Threads
- Submit a package which use doParallel
- Submit a package which use doParallel
- help with execution of 'embarrassingly parallel' problem using foreach, doParallel on a windows system
- Binding dataframe with different length in rows and columns
- Paralelizar el cálculo de distancias