[R] platform specific "Depends" argument?
Florian Schwaiger
schwaige at mathematik.uni-marburg.de
Mon Jan 28 11:43:12 CET 2013
Dear R users,
we have a problem when building R packages which depend on platform
specific packages. The following example will illustrate our problem:
For parallel computing (in our own package) we want to use the multicore
package. Since multicore is not available for Windows we subtitute it by
the snowfall package. Currently we create two packages with different
"Depends" argument in the DESCRIPTION files (one for unix and one for
Windows).
We considered using the .onLoad function and calling library(multicore)
resp. library(snowfall) depending on the employed system, but it is said
in the help of that function that it is not "Good practice" to do so.
Is there a better practice than building two packages (with the same
name and almost same code) for the different platforms. Any help is
appreciated.
Matthias and Florian
More information about the R-help
mailing list