From geoffjentry at hexdump.org  Mon Apr 11 20:34:06 2011
From: geoffjentry at hexdump.org (Geoff Jentry)
Date: Mon, 11 Apr 2011 11:34:06 -0700
Subject: [Rd] Conditional "Suggests"
Message-ID: <Pine.LNX.4.64.1104111128300.9064@cardinals.dreamhost.com>

Hi ...

I came across an old post on R-devel that describes a situation very 
similar to one I find myself in:
https://stat.ethz.ch/pipermail/r-devel/2006-December/043917.html

As you can see in Gregor's example, the situation is that if I am writing 
Pkg A, I want to detect if Pkg B exists - if so use some functionality 
from there, otherwise do something else.

To me this reads as being in the wheelhouse of what 'Suggests' is supposed 
to imply, as per the R Extensions manual.  The problem here is that if 
PkgB is put down as 'Suggests', it is required for R CMD check to pass 
which seems to defeat the purpose of this exercise a bit.

If one puts it as 'Enhances' one gets a NOTE earlier in check but then the 
WARNING described in this post due to the require() call.

Is there a good way around this situation, such that the PkgA can pass a R 
CMD check if PkgB doesn't exist on the system, for instance a case where 
PkgB isn't available for a particular OS?  If there are multiple methods 
around this problem, is one more blessed by the powers that be than 
others?

Thanks
-J



[Rd] Conditional "Suggests"
Geoff Jentry