get_envs_in_env: Find user environments inside another user environment

Description Usage Arguments Value

View source: R/functions.r

Description

Function that looks for user environments defined within a given user environment.

Usage

1
get_envs_in_env(env_name, path, path_to_envs_found, rootenvir = .GlobalEnv)

Arguments

env_name

name of the user environment where the search for other user environments should be carried out.

path

array containing the user environment names leading to the env_name environment.

path_to_envs_found

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.

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 evaluated in the rootenvir environment which in this case is the "package:envnames" environment.

Value

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.


envnames documentation built on Dec. 8, 2020, 9:07 a.m.