Set of functions to keep track of user-defined environment names (which cannot be retrieved with the built-in function environmentName()). The package also provides functionality to search for objects in environments, deal with function calling chains, and retrieve an object's memory address.
R package to retrieve the name of user-defined environments and of function execution environments.
The main goal of this package is to overcome the limitation of the built-in
environmentName() function from the base package which does not return the name of an environment unless it is a package, a namespace or a system environment (e.g. the global environment, the base environment, the empty environment).
The envnames package solves this problem by creating a lookup table that maps environment names to their memory addresses. Using this lookup table, it is possible to retrieve the name of any environment where an object resides, be it a package, namespace, system environment, user-defined environment, or function execution environment.
See the following post as motivation for creating this package: https://stat.ethz.ch/pipermail/r-help/2010-July/245646.html
get_env_names()and thus retrieved by the
locationaddresscolumn of the address-name lookup table created by
get_env_names()is now filled with the address of the
locationenvironment where user-defined environments live (instead of being equal to
NAin those cases).
envirparameter of the
obj_find()function to a non-
envirenvironment is shown in the name of the environments where the searched object is found.
testenv) used to test package functionalities related to finding environments defined in packages.
Initial submission to CRAN.