From rpeng at jhsph.edu  Tue Sep 20 15:42:22 2005
From: rpeng at jhsph.edu (Roger D. Peng)
Date: Tue, 20 Sep 2005 09:42:22 -0400
Subject: [Rd] Shy Suggestion?
In-Reply-To: <1127222728.21824.15.camel@biol102145.oulu.fi>
References: <1127222728.21824.15.camel@biol102145.oulu.fi>
Message-ID: <433011BE.8090007@jhsph.edu>

I think this needs to fail because packages listed in 'Suggests:' may, for 
example, be needed in the examples.  How can 'R CMD check' run the examples and 
verify that they are executable if those packages are not available?  I suppose 
you could put the examples in a \dontrun{}.

-roger

Jari Oksanen wrote:
> The R-exts manual says about 'Suggests' field in package DESCRIPTION:
> 
> "The optional `Suggests' field uses the same syntax as `Depends' and
> lists packages that are not necessarily needed."
> 
> However, this seems to be a suggestion you cannot refuse. If you suggest
> packages:
> 
> (a line from DESCRIPTION):
> Suggests: MASS, ellipse, rgl, mgcv, akima, lattice
> 
> This is what happens:
> 
> $ /tmp/R-alpha/bin/R CMD check vegan
> * checking for working latex ... OK
> * using log directory '/home/jarioksa/devel/R/vegan.Rcheck'
> * using R version 2.2.0, 2005-09-19
> * checking for file 'vegan/DESCRIPTION' ... OK
> * this is package 'vegan' version '1.7-75'
> ... clip ...
> * checking package dependencies ... ERROR
> Packages required but not available:
>   ellipse rgl akima
> 
> In my cultural context suggesting a package means that it is not
> necessarily needed and the check should not fail, although some
> functionality would be unavailable without those packages.  I want the
> package to pass the tests in a clean standard environment without
> forcing anybody to load any extra packages. Is there a possibility to be
> modest and shy in suggestions so that it would be up to the user to get
> those extra packages needed without requiring them in R CMD check?
> 
> I stumbled on this with earlier versions of R, and then my solution was
> to suggest nothing. 
> 
> cheers, jari oksanen

-- 
Roger D. Peng
http://www.biostat.jhsph.edu/~rpeng/



[Rd] Shy Suggestion?
Roger D. Peng