[Rd] R CMD check warning "no visible binding for global variable" and hasArg()

From: Dr. Peter Ruckdeschel <peter.ruckdeschel_at_itwm.fraunhofer.de>
Date: Fri, 22 Aug 2008 15:48:14 +0200


Hi R-devels,

latetely I reported having problems with understanding warnings issued by a devel version of R CMD check, which Brian Ripley in his reply

     https://stat.ethz.ch/pipermail/r-devel/2008-August/050493.html

correctly attributed to my using an outdated version (July 29) --- you really have to be quick with updating these days!

Having switched to a more recent version, R CMD check indeed no longer issued these warnings and instead helped me to detect some missing bindings for global variables --- thank you Kurt for this!  

In some occasions the warning "no visible binding for global variable XY" seems overly fuzzy to me, however:

R CMD check also issues this warning, if, by means of function hasArg() from
package 'methods', I want to test the presence of a certain argument 'x' in a
function call when 'x' is not a formal argument but "..." is. Clearly, then 'x' in general will have no binding.

I am not sure whether this is of general interest, but I think it should not be too difficult to check whether this "missing binding" occurs within a call
to hasArg() [and then not to issue the warning].

Thanks for listening,
best regards,
Peter

-- 
Dr. Peter Ruckdeschel, Abteilung Finanzmathematik, F3.17
Fraunhofer ITWM, Fraunhofer Platz 1, 67663 Kaiserslautern
Telefon:  +49 631/31600-4699
Fax    :  +49 631/31600-5699
E-Mail :  peter.ruckdeschel_at_itwm.fraunhofer.de





______________________________________________ R-devel_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Received on Fri 22 Aug 2008 - 13:51:00 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 22 Aug 2008 - 15:37:31 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