Learn R Programming

modules (version 0.9.8)

fix_module_attributes: Save a module<U+2019>s inherited attributes into a local environment

Description

Save a module<U+2019>s inherited attributes into a local environment

Usage

fix_module_attributes(envir)

Arguments

envir

the environment into which to copy the inherited attributes

Details

Attaching a module to an environment makes the environment <U+201C>forget<U+201D> its actual enclosing environment. This is important since that module holds information such as the module name or path, which may be required in the current local scope. To fix this, fix_module_attributes copies the enclosing module<U+2019>s attributes into the local environment.