Function that looks for user environments defined within a given user environment.
get_envs_in_env(env_name, path, path_to_envs_found, rootenvir = .GlobalEnv)
name of the user environment where the search for other user environments should be carried out.
array containing the user environment names leading to the env_name
environment.
array of environment names found so far including their path
(as in testenv$env1
). Note that the path does NOT include the *location* of the user
environments which is actually the system or package environment where the crawling starts
defined by parameter rootenvir
.
root environment specifying the location where the crawl of user environmnts
starts. This is needed for the eval()
to work when resolving the name of the input environment
env_name
into an enviroment. Ex: if we are crawling the environments defined in the envnames package,
rootenvir
should be equal to the "package:envnames" environment, and here is where we are going to
find all the user environments that are crawled by this process as e.g.:
testenv
testenv$env1
...
i.e. all these environments will be eval
uated in the rootenvir
environment which
in this case is the "package:envnames" environment.
Either an updated path_to_envs_found
with the user environments found so far
in the user environments tree or TRUE
, which indicates that a leaf in the user
environments tree hanging from rootenvir
has been reached.