[Rd] NOTE: unstated dependencies in examples

Michael Friendly friendly at yorku.ca
Fri Oct 14 14:57:09 CEST 2011


On 10/13/2011 11:34 AM, Uwe Ligges wrote:
> I looked at the code and since this is not that trivial to change, I
> think we can well live with typing
>
> grep -r gplots ./man
>
> which is not too hard to run on the source package, I believe.
>
> Best wishes,
> Uwe
>
Yes, that's quite easy, if I wanted to search for files mentioning 
gplots.  However, the NOTE was misleading:

  'library' or 'require' calls not declared from:
  gplots sp

suggesting that I had used a function from those packages somewhere 
without a library() or require().  It turned out that I had just omitted 
those packages from the Suggests: line in DESCRIPTION.  So,
perhaps it would be more informative to say:

  'library' or 'require' calls not declared in Depends: or Suggests: from:
  gplots sp

-Michael

>
>
>
> On 13.10.2011 03:00, Yihui Xie wrote:
>> You have this in Jevons.Rd:
>>
>> # show as balloonplots
>>
>> if (require(gplots)) {
>>
>>
>> and this in Snow.Rd:
>>
>> %\dontrun{
>>
>> library(sp)
>>
>>
>> It will certainly be helpful if R CMD check can provide more
>> informative messages (in this case, e.g, point out the Rd files).
>>
>> Regards,
>> Yihui
>> --
>> Yihui Xie<xieyihui at gmail.com>
>> Phone: 515-294-2465 Web: http://yihui.name
>> Department of Statistics, Iowa State University
>> 2215 Snedecor Hall, Ames, IA
>>
>>
>>
>> On Wed, Oct 12, 2011 at 11:33 AM, Michael Friendly<friendly at yorku.ca>
>> wrote:
>>> Using R 2.13.1, I am now getting the following NOTE when I run R CMD
>>> check
>>> on my HistData
>>> package
>>>
>>> * checking for unstated dependencies in examples ... NOTE
>>> 'library' or 'require' calls not declared from:
>>> gplots sp
>>>
>>> Under R 2.12.x, I didn't get these notes.
>>>
>>> I have ~ 25 .Rd files in this package, and AFAICS, every example uses
>>> library or require for the
>>> functions used; the DESCRIPTION file has the long list of Suggests,
>>> which
>>> previously was sufficient
>>> for packages used in examples.
>>>
>>> Suggests: gtools, KernSmooth, maps, ggplot2, proto, grid, reshape, plyr,
>>> lattice, ReadImages, car
>>>
>>> But I have no way to find the .Rd file(s) that triggered this note.
>>>
>>> What is the tool used in R CMD check to make this diagnosis? It would be
>>> better
>>> if this reported the .Rd file(s) that triggered this note.
>>> Is it possible that this note could be specious?
>>>
>>> -Michael
>>>
>>> --
>>> Michael Friendly Email: friendly AT yorku DOT ca
>>> Professor, Psychology Dept.
>>> York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
>>> 4700 Keele Street Web: http://www.datavis.ca
>>> Toronto, ONT M3J 1P3 CANADA
>>>
>>> ______________________________________________
>>> 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
>


-- 
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA



More information about the R-devel mailing list