[R-pkg-devel] doMC dependency

Brian G. Peterson brian at braverock.com
Mon May 15 21:04:10 CEST 2017

On Mon, 2017-05-15 at 16:09 +0000, Christopher Lalansingh wrote:
> Hi everyone,
> I'm preparing to release a package which uses doMC for
> parallelization in certain functions. I've used require(doMC) to
> specify this for these functions, and importFrom("doMC",
> "registerDoMC") in my NAMESPACE.
> I ran all the R CMD --as-cran checks under 3.4.0 and R-devel on
> Debian 8 sucessfully, but when I submitted to CRAN the package failed
> when built on Windows. This is because doMC is not available for
> Windows. It was recommended by Uwe Ligges that I move doMC to
> "Suggests", but since doMC is required for functions in my package
> this does not seem to work:

I'd suggest using doParallel instead of doMC if you want your package
to work on Windows too.  the 'parallel' package uses forking clusters
on *nix and TCP/snow style clusters on Windows.  

You'll need to do a little work to detect things, or give users
instructions for initializing a cluster, but it should work. 

> * checking package dependencies ... ERROR
> Namespace dependency not required: 'doMC'
> Is there a way to keep doMC in 'Suggests' by changing how I
> attach/load doMC in my package?

More information about the R-package-devel mailing list