Skip to content
Prev 43029 / 63421 Next

R CMD check returns NOTE about package data set as global variable

On Apr 6, 2012, at 21:33 , Brad McNeney wrote:

            
Hm? It's not like Brian to get such things wrong, did you check properly?

Perhaps the code checker is not smart enough to know that data() creates global variables. (That would be heuristic at best. You can't actually be sure that data() creates objects with the name given as the argument -- in fact, several objects might be created, possibly none named as the argument). 

You are not using LazyData, right?  You might consider doing that and forgetting about data() entirely.

  
    

Thread (16 messages)