Skip to content
Prev 2276 / 12125 Next

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

I'm not CRAN, but something like this might be permissible while
satisfying your requirements.

   z <- function(..., assign.env = parent.frame(1))
assign(as.character(s), temp3, envir = assign.env)

The problem with assigning to the global environment is that z might
be called where it is expected to only have a local effect. If users
really want to assign to the global environment, providing an option
might be appropriate.

   z <- function(y, s, assign.env = getOption("TSEtools.z.env",
parent.frame(1))) assign(as.character(s), temp3, envir = assign.env)

   options("TSEtools.z.env" = .GlobalEnv)
On Sun, 7 Jan 2018 at 23:21 Saeb <ali.saeb at gmail.com> wrote: