analysis_env: Create a Temporary Analysis Environment
Description
Creates a temporary environment for analysis that isolates objects from
the global environment. This helps prevent memory leaks and allows for
easy cleanup after analysis.
Usage
analysis_env(parent_env = parent.frame(), cleanup = TRUE)
Value
New environment for analysis
Arguments
- parent_env
Environment to use as parent (default: parent.frame())
- cleanup
Logical, whether to automatically clean up on exit