[Bioc-devel] no visible binding for global variable message
* On 2008-04-04 at 15:23 +0200 Laurent Gautier wrote:
2008/4/3, Seth Falcon <seth at userprimary.net>:
There's probably a cleaner way to code this now. I would consider creating the environment within your package instead of the global envirnt. And mostly for readability, I would not use assignsign() and get() when working with environments, but instead [[ and <-. So you could have: affylmGUIenvironment <- new.env(hash=TRUE, parent=emptyenv()) Read the help page for details, but generally if you are using an environment as a hashtable you don't what it to inherit bindings and parent=emptyenv() is what you want.
Wow. I missed that one "new" feature with environments: methods "[[" and "[[<-". Looking quickly at the current development bioconductor code, it seems that "assign" is still very much used.
These features are not particularly new, but new is in the eye of the beholder I suppose :-) I don't mean to malign assign(). The reason I prefer [[<- is that it reads like other assignments in R. + seth
Seth Falcon | http://userprimary.net/user/