[Rd] package check note: no visible global function definition (in functions using Tcl/Tk)
Thomas Petzoldt
Thomas.Petzoldt at TU-Dresden.de
Mon Jun 11 22:23:34 CEST 2007
Dear Prof.Ripley, Dear Seth,
thank you both, including tcltk in Depends as suggested by Prof. Ripley
immediately helped to silence the tcltk NOTEs, but Seth is also right.
It is in fact not the ultimate solution for the Suggests case, that I
intentionally used like in Seth's code example.
Thomas
Seth Falcon wrote:
> 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
>
More information about the R-devel
mailing list