I would like to ask if it is possible to copy/move all the objects of one environment to another, at once. For example:
f1 <- function() { print(v1)
I use this function in my package to copy objects:
copyEnv <- function(from, to, names=ls(from, all.names=TRUE)) { mapply(assign, names, mget(names, from), list(to), SIMPLIFY = FALSE, USE.NAMES = FALSE) invisible(NULL) }