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
On Mon, Apr 11, 2011 at 1:34 PM, Geoff Jentry <geoffjentry at hexdump.org> wrote:> 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.No, because R CMD check is only run by the developer, not the user. Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/
Possibly Parallel Threads
- Are downstream dependencies rebuilt when a package is updated on CRAN?
- "False" warning on "replacing previous import" when re-exporting identical object
- S4 NAMESPACE method imports and exports do not include (promoted?) generics
- .onLoad failing because could not find function "loadMethod"
- S4 Generics and NAMESPACE : justified warning ?