[Rd] How to NAMESPACE OS-specific importFrom?

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Feb 7 08:42:40 CET 2013


On 07/02/2013 02:33, Martin Morgan wrote:
> I'd like to importFrom(parallel, mccollect, mcparallel) but on Windows
> these are not exported because this
>
> if(tools:::.OStype() == "unix") {
>      export(mccollect, mcparallel, mc.reset.stream, mcaffinity)
> }
>
> appears at src/library/parallel/NAMESPACE:6 of svn r61857. So should I
> be doing
>
> if (tools:::.OStype() == "unix") {
>      importFrom(parallel, mccollect, mcparallel)
> }
>
> in my NAMESPACE? I have a recollection that this has come up before,
> perhaps even in the parallel package, but I'm not able to find anything.

Yes.

Those are low-level functions in 'parallel': we provide stubs on Windows 
for user-level functions (which is where it came up before these were 
added).

> Thanks,
>
> Martin Morgan


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list