[Rd] 'R CMD check' fails when suggested package is not available

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Apr 5 05:29:17 CEST 2007

This is a configurable option 'R_check_force_suggests' documented in 
'Writing R Extensions'.

This package should be using Enhances: Rmpi, it seems.

On Wed, 4 Apr 2007, Herve Pages wrote:

> Hi there,
> I was wondering why I get the following error message:
>  * checking package dependencies ... ERROR
>  Packages required but not available:
>    Rmpi
> when I run 'R CMD check' on a package that _suggests_ Rmpi?
> Why isn't it OK to not have all the suggested packages installed?
> Maybe one of the 3 following behaviours would be more appropriate:
>  a) Having the error saying something like:
>    Package suggested but not available:
>      Rmpi
>  b) Make this a warning instead of an error.
>  c) Don't do anything at all for suggested packages.
> This issue showed up today while I was checking a new Bioconductor package:
> the package suggests Rmpi but the vignette and the examples don't use it. If I remove
> Rmpi from the Suggests field then 'R CMD check' runs all the examples and re-create
> the vignette with no problem. Most users will not have Rmpi on their machine neither
> will they be interested in getting into the trouble of installing it.

'Most users' will not be running 'R CMD check', of course.

> The package I was checking suggests Rmpi only because it contains 1 function that tries
> to use it if it's installed but will work perfectly fine otherwise.
> In this case it seems reasonable to have Rmpi in the Suggests field but this will
> make 'R CMD check' to fail which is problematic in the context of automated builds :-/
> If 'R CMD check' can't be a little bit more relaxed about this, then I guess we will
> need to remove Rmpi from the Suggests field, but then 'R CMD check' will complain that:
>  * checking for unstated dependencies in R code ... WARNING
>  'library' or 'require' calls not declared from:
>    Rmpi
> which is always better than getting an ERROR.
> Thanks!
> H.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-devel mailing list