envName: Informative Names for Environments

Description Usage Arguments Value Author(s) Examples

Description

These functions return the names for an environment (envName()) or for an environment and all its parents (envNames()), with informative labels in the style of the default print method, but extended to describe evaluation frames as well as namespaces and package environments.

Usage

1
2
3
envName(envir)

envNames(envir)

Arguments

envir

An environment object.

Value

A character vector, with the single name of the environment or that followed in order by its successive parents; i.e., parent.env(envir), parent.env(parent.env(envir)), etc.

Author(s)

John Chambers

Examples

1
2
3
4
5
## the namespace for this package, and its parents
envNames(asNamespace("XR"))
# a function that returns its frame and parents
showMyEnv <- function() envNames(sys.frame(sys.nframe()))
showMyEnv()

johnmchambers/XRtools documentation built on May 19, 2019, 5:16 p.m.