Learn R Programming

track (version 1.1.9)

show.envs: Show the environments referenced within an object.

Description

show.envs recursively examines x and the objects within it, printing the names of any environments encountered. It does NOT recursively enter environments -- once it finds an environment it just prints the name of that environment and doesn't look further inside the environment.

Usage

show.envs(x, obj = substitute(x))

Arguments

x
The object to examine.
obj
An expression describing the object. Not intended to be supplied by the user.

Value

The number of environments encountered.

Details

show.envs attemps to show the environments referenced within an object, but it may miss some. If you encounter any such cases, please email them to tplate@acm.org.

Examples

Run this code
x <- data.frame(a=1:10, b=10:1)
m <- lm(a ~ b, data=x)
show.envs(m)

Run the code above in your browser using DataLab