[Rd] Shy Suggestion?

Roger D. Peng rpeng at jhsph.edu
Tue Sep 20 15:42:22 CEST 2005


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/



More information about the R-devel mailing list