load_env: Load Rdata to an environment

View source: R/all.R

load_envR Documentation

Load Rdata to an environment

Description

Instead of loading RData files to the global environment load them to a new env. base::load already has a way to do this, but this is a convenience function that creates a new environment by default.

Usage

load_env(RData, env = new.env())

Arguments

RData

path to the RData file you want to load

env

the environment you want to load to. Defaults to a new environment.

Value

Returns the environment you are loading to.

Examples

# data_env <- load_env('file1.RData')
# load_env('file2.RData', data_env)


adamleerich/alrtools documentation built on March 12, 2024, 11:38 p.m.