Learn R Programming

envnames (version 0.4.1)

clean_up_matching_environments: Clean up the list of environments matching a memory address in an environment map.

Description

Clean up the list of environments matching a memory address in an environment map.

Usage

clean_up_matching_environments(envmap, indfound)

Arguments

envmap

data frame with the name-address pairs of environments having at least a column called "type" that specifies the type of environment, for which "function" is used to indicate a function execution environment.

indfound

array containing the indices in envmap giving the environments to clean up (typically these are the environments that match a given memory address).

Value

an array containing the indices in indfound after cleanup.

Details

A clean list of matched environments from envmap should either:

  • contain ONLY ONE function execution environment,

  • contain one ore more user or named environments.

If none of the above is the case, all function execution environments are removed from the list of matching environments, i.e. removed from the indfound array.