r-rudra/tidycells

use <attach> to dynamically export optional components in the search space

bedantaguru opened this issue · 1 comments

Following is the prototype

nev <- new.env()

get_new_var <- function(){

  attach(nev, pos = 2L, name = "pkg:internals")
}


nev$`%+%` <- function(x, y){
  x*y
}

Note that the above needs to be tuned for the fact that it does not detach on the unload of the package.