From hpages at fhcrc.org  Fri Apr  6 23:17:39 2012
From: hpages at fhcrc.org (=?UTF-8?B?SGVydsOpIFBhZ8Oocw==?=)
Date: Fri, 06 Apr 2012 14:17:39 -0700
Subject: [Rd] R CMD check returns NOTE about package data set as global
 variable
In-Reply-To: <1333746244.24441.44.camel@brian-desktop>
References: <1114888490.18258021.1333740833420.JavaMail.root@jaguar9.sfu.ca>
	<4F7F50A5.7090304@fhcrc.org>
	<1333746244.24441.44.camel@brian-desktop>
Message-ID: <4F7F5D73.4070002@fhcrc.org>

Hi Brian,

On 04/06/2012 02:04 PM, Brian G. Peterson wrote:
> On Fri, 2012-04-06 at 13:23 -0700, Herv? Pag?s wrote:
>> test<-function() {
>>      RutgersMapB36<- NULL
>>      data(RutgersMapB36)
>>      return(RutgersMapB36[,1])
>> }
>
> That won't work, but this should:
>
> RutgersMapB36<- NULL
> test<-function() {
>      data(RutgersMapB36)
>      return(RutgersMapB36[,1])
> }
>
> Honestly, this is just another example of a non-helpful 'global
> variable' NOTE.  I've removed many of these from our packages, often by
> resorting to useless workarounds like this one, but I have never once
> gotten a valid NOTE out of this message.  We provided other examples
> earlier in a different thread.
>

Other people might have a different experience. I've personally seen a
lot of true positive "no visible binding for global variable" notes in
the Bioconductor check results.

In that sense 'R CMD check' is no different from other code checking
tools like e.g. gcc -Wall. There are sometimes false positives, it's
unavoidable. Personally I can live with that.

Cheers,
H.

-- 
Herv? Pag?s

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



[Rd] R CMD check returns NOTE about package data set as global variable
=?UTF-8?B?SGVydsOpIFBhZ8Oocw==?=