Skip to contents

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)

Arguments

parent_env

Environment to use as parent (default: parent.frame())

cleanup

Logical, whether to automatically clean up on exit

Value

New environment for analysis