Re: [Rd] R CMD check returns NOTE about package data set as global variable

From: Brian G. Peterson <brian_at_braverock.com>
Date: Fri, 06 Apr 2012 16:04:04 -0500

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.

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri 06 Apr 2012 - 21:05:38 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 Wed 11 Apr 2012 - 16:10: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.

list of date sections of archive