powered by
A wrapper function that uses assign and get.
copy_e2e(from_obj, from_env, to_obj, to_env)
There is no return value. This function is called for its' side effect.
The name of the object to copy. It has to be a string.
The environment in which the object lives. It has to be an object of class environment.
The name of the object to assign it to, in the new environment. Also a string.
The environment to which the new object is to be assigned. It has to be an object of class environment.
e1 <- new.env(); e2 <- new.env() ls(e2) evalq(x <- 1L, e1) copy_e2e("x", e1, "y", e2) ls(e2)
Run the code above in your browser using DataLab