Dear Henrik,
dear all,

thank you very much!

What you recommended works, see here: :-D

=========
The files will be removed after roughly 72 hours.
Installation time in seconds: 9
Check time in seconds: 22
Check result: OK
R version 2.14.0 (2011-10-31)
=========


And also thank you for pointing out the new package 'parallel'. Just started reading the vignette.

Thanks,
Roland



-----Original Message-----
From: henrik.bengtsson@gmail.com on behalf of Henrik Bengtsson
Sent: Mon 11/28/2011 18:10
To: Rau, Roland
Cc: r-devel@r-project.org
Subject: Re: [Rd] Avoid package in build process when not supported on OS
 
Move doMC from Requests: to Suggests: and load it in the code when
needed, e.g. library("doMC").

BTW, make sure you are aware of the new 'parallel' package that comes
with R v2.14.0.

/H

On Mon, Nov 28, 2011 at 7:39 AM, Rau, Roland <Rau@demogr.mpg.de> wrote:
> Dear all,
>
> I am currently working on a package which involves some simulation where no current simulation run depends on a previous simulation run.
> That is why I decided to parallelize the computation using the doMC package (which exists only for unix-like OS).
>
> I can create a package without any R CMD check and R CMD build errors on my computers (Ubuntu Linux 32bit & 64 bit).
>
> The problem that I have is: I would like to make the package platform-independent. In this case, this should not be difficult. A simple:
>
> if (!(.Platform$OS.type=="unix")) {
>  ....
> }
>
> allows me to specify a different execution path on non unix-like operating systems (i.e. not using doMC-code, resulting in running the code not in parallel).
>
> I just tried it out and uploaded the source package to http://win-builder.r-project.org/
>
> Unfortunately, I get the following result:
> [...]
> * checking package dependencies ... ERROR
> Package required but not available: 'doMC'
> [...]
>
> I interpret it as such: Even if the package will never be required (for a particular OS) the build process nevertheless checks whether the packages exists for the respective platform.
> What would you suggest? Create two packages (mypackage vs. mypackageNONUNIX)? Release only for unix-like systems? ...?
>
> Thank you in advance,
> Roland
>
>
>
> ----------
> This mail has been sent through the MPI for Demographic ...{{dropped:10}}
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


----------
This mail has been sent through the MPI for Demographic ...{{dropped:10}}

