env2global | R Documentation |
This function will extract all variables from the given environment and assign them to the global environment and then optionally remove the environment.
env2global(x, remove = TRUE)
x |
Environment to extract variables from |
remove |
Should the Environment be removed after extracting variables? Default TRUE |
variables from x are assigned to the GlobalEnv after execution
my_env <- new.env()
my_env$X <- 1000
my_env$Y <- 1:10
# Extract X and Y to global environment and remove my_env
env2global(my_env)
# Extract X and Y to global environment and keep my_env
env2global(my_env, remove = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.