Skip to content
Prev 2279 / 12125 Next

[R-pkg-devel] Assignments to the Global environment

I think that assigning something to parent.frame() is bad practice, for the
same reasons that assigning to .GlobalEnv is bad.  You could instead make
an environment in your package called, say, "TSEtools.env", with
    TSETools.env <- new.env()
in some *.R file in the package's R directory.  Export it via NAMESPACE.
 Then use
TSETools.env as the default value of assign.env().



Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Sun, Jan 7, 2018 at 6:41 AM, Hugh Parsonage <hugh.parsonage at gmail.com>
wrote: