[Bioc-devel] no visible binding warning messages
Henrik Bengtsson
hb at stat.berkeley.edu
Wed Sep 12 18:42:13 CEST 2007
Hi Keith (and others),
just a note, the code checker is not perfect, but it still great. i
helps us find some of the bugs. For instance, it helped me find
mistyped variable names in conditional statements that are rarely
called, but when called would give an error. So, it is worth walking
through the NOTEs, because some might actually be typos/bugs.
Also, I don't know the latest updates, sometimes you have to do things like:
ORIGINAL:
data(USArrests);
str(USArrests) # Use the data loaded
UPDATE:
USArrests <- NULL; rm(USArrests); # A code dummy
data("USArrests");
str(USArrests); # Use the data loaded
to please the checker. BTW, note the rm(), because data() loads to
the global variables, so you have to remove the dummy in order for the
loaded data to be retrieved. Of course, you can also use 'envir'
using sys.frame() etc to load data to the current environment.
Cheers
Henrik
On 9/12/07, Vincent Carey 525-2265 <stvjc at channing.harvard.edu> wrote:
> > Can you help me overcome warning messages that I am getting with R-2.6.0alpha.
> > My package compiles without these warning messages under R-2.5.1.
> >
> > When running the command:
> >
> > R CMD check affylmGUI
> >
> > I get over 400 lines of warning messages like:
> >
> > * checking R code for possible problems ... NOTE
> > affylmGUI: no visible binding for global variable
> > affylmGUIenvironment
> > affylmGUI: no visible binding for global variable .affylmGUIglobals
> > affylmGUI : <anonymous>: no visible binding for global variable
> > .affylmGUIglobals
> > affyPlotMA: no visible binding for global variable
> > affylmGUIenvironment
> > affyPlotMA: no visible binding for global variable .affylmGUIglobals
> > affyPlotMA : plotFunction: no visible binding for global variable
> > .affylmGUIglobals
> > ...
> >
> > If I set the environment variable _R_CHECK_USE_CODETOOLS_ to false,
> > I don't get any of these messages and the package compiles fine - no errors, no
> > warnings. However I need to remove all these warnings by the deadline date. I
>
> If I understand correctly, a NOTE is not a WARNING, so you are not
> obligated to remove it, and NOTEs should not turn your Check page
> color to yellow.
>
> If you can get rid of the NOTE by giving an initial binding for the
> global variables, why not do that?
>
> _______________________________________________
> Bioc-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
More information about the Bioc-devel
mailing list