Skip to content

How to NAMESPACE OS-specific importFrom?

2 messages · Martin Morgan, Brian Ripley

#
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.

Thanks,

Martin Morgan
#
On 07/02/2013 02:33, Martin Morgan wrote:
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).