Re: [Rd] R CMD check and Suggests Packages

From: Simon Urbanek <simon.urbanek_at_r-project.org>
Date: Fri, 29 Apr 2011 10:36:00 -0400

On Apr 29, 2011, at 9:52 AM, Steve Lianoglou wrote:

> Hi,
>
> On Fri, Apr 29, 2011 at 5:29 AM, Prof Brian Ripley
> <ripley_at_stats.ox.ac.uk> wrote:

>> On Fri, 29 Apr 2011, Dario Strbenac wrote:
>> 
>>> Hello,
>>> 
>>> In my description file, I have an example data package in Suggests: that
>>> I've deleted from my library to test what the user who doesn't have it will
>>> experience.
>>> 
>>> However, R CMD check won't even pass my package :
>>> 
>>> * checking package dependencies ... ERROR
>>> Package required but not available: RepitoolsExamples
>>> 
>>> Why would it have to be installed, if it's only a data package, that isn't
>>> needed in any of my code ? The manual also says "In particular, large
>>> packages providing “only” data for examples or vignettes should be listed in
>>> ‘Suggests’ rather than ‘Depends’ in order to make lean installations
>>> possible."
>> 
>> Why suggest a package that 'isn't needed in any of my code'?
>> 
>> I suspect that is a lie, and some of your code does use it: if some it is
>> needed to fully check the package.   There is a option to 'R CMD check' to
>> enable the check to go ahead without all the dependencies, so please do
>> re-read the manuals to find it.

>
> Here's a stab in the dark:
>
> Perhaps the OP has code in some \examples{} section for some help
> (*.Rd) file that then tries to load data from the "suggested" package?
>

But that is a valid use of Suggests: as long as it is guarded against that package not being present.

The point here is that the default is to check those packages yet Dario doesn't like it and thus should turn it off if he feels so inclined. (That's my interpretation without knowing the package).

Cheers,
Simon

> The code in the \examples{} sections of *.Rd files are run during R
> CMD check ... so, if you're trying to load data from a suggested
> package that may not be installed, perhaps you can wrap those code
> blocks with \dontrun{}.
>

Not really - that defeats the purpose - it will never be checked int hat case!

> For more info: this is covered in the "Writing R Extensions," but is
> also described here:
> http://stackoverflow.com/questions/1454211/what-does-not-run-mean-in-r-help-pages
>
> HTH,
> -steve
>
> --
> Steve Lianoglou
> Graduate Student: Computational Systems Biology
> | Memorial Sloan-Kettering Cancer Center
> | Weill Medical College of Cornell University
> Contact Info: http://cbio.mskcc.org/~lianos/contact
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 29 Apr 2011 - 14:45:02 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 29 Apr 2011 - 16:20:59 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive