copy_to_global: Copy Variables from One Environment to the Global Environment

View source: R/copy_to_global.R

copy_to_globalR Documentation

Copy Variables from One Environment to the Global Environment

Description

This function copies all variables from a specified source environment to the global environment.

Usage

copy_to_global(source_env)

Arguments

source_env

An environment from which to copy variables. This should be a valid R environment.

Value

Invisible NULL. The function is called for its side effect of copying variables to the global environment.

Examples

env_example <- new.env()
env_example$a <- 1
env_example$b <- 2
copy_to_global(env_example)
print(a)  # Should print 1
print(b)  # Should print 2

chris-hsiung/bears01 documentation built on April 9, 2024, 2:01 a.m.