Re: [Rd] package check note: no visible global function definition (in functions using Tcl/Tk)

From: Seth Falcon <sfalcon_at_fhcrc.org>
Date: Mon, 11 Jun 2007 09:55:21 -0700

Prof Brian Ripley <ripley_at_stats.ox.ac.uk> writes:

> It seems that is happens if package tcltk is missing from the Depends:
> list in the DESCRIPTION file. I just tested with Amelia and homals and
> that solved the various warnings in both cases.

Adding tcltk to Depends may not always be the desried solution. If tcltk is already in Suggests, for example, and the intention is to optionally provide GUI features, then the code may be correct as-is. That is, codetools will issue the NOTEs if you have a function that looks like:

   f <- function() {

     if (require("tckltk")) {
             someTckltkFunctionHere()
     } else
             otherwiseFunction()
     }

   }

There are a number of packages in the BioC repository that provide such optional features (not just for tcltk) and it would be nice to have a way of declaring the use such that the NOTE is silenced.

[Note 1: I don't have any ideas at the moment for how this could work.]

[Note 2: Despite the false-positives, I've already caught a handful of bugs by reading over these NOTEs and think they provide a lot of value to the check process]

+ seth

-- 
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 11 Jun 2007 - 16:59:49 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 Thu 14 Jun 2007 - 16:34:44 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.