[Rd] Conditional importFrom (roxygen?)

Ben Bolker bbolker at gmail.com
Mon Oct 5 01:34:50 CEST 2015


Duncan Murdoch <murdoch.duncan <at> gmail.com> writes:

> 
> On 04/10/2015 10:10 AM, Jonathan Greenberg wrote:
> > Folks:
> > 

[snip snip snip]

> > 
> > Is there a way to do a conditional importFrom based on the OS?  Or can I
> > safely ignore this (I'm trying to submit to CRAN).
> > 
> 
> Yes, you can put conditionals into the NAMESPACE file.  Apparently
> roxygen2 doesn't support this feature, so you'll have to do it by hand.
> 
> Duncan Murdoch
> 
> 

This has been submitted as an issue at

https://github.com/klutometis/roxygen/issues/378

closely related:

https://github.com/klutometis/roxygen/issues/371

my current hacky solution to this is to use a Makefile that
post-processes the NAMESPACE after it's roxygenized, e.g. search
for "getRversion" in

https://github.com/glmmTMB/glmmTMB/blob/master/Makefile



More information about the R-devel mailing list