Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

env_print

Pretty-print an environment


Description

This prints:

  • The label and the parent label.

  • Whether the environment is locked.

  • The bindings in the environment (up to 20 bindings). They are printed succintly using pillar::type_sum() (if available, otherwise uses an internal version of that generic). In addition fancy bindings (actives and promises) are indicated as such.

  • Locked bindings get a [L] tag

Note that printing a package namespace (see ns_env()) with env_print() will typically tag function bindings as <lazy> until they are evaluated the first time. This is because package functions are lazily-loaded from disk to improve performance when loading a package.

Usage

env_print(env = caller_env())

Arguments

env

An environment, or object that can be converted to an environment by get_env().


rlang

Functions for Base Types and Core R and 'Tidyverse' Features

v0.4.11
MIT + file LICENSE
Authors
Lionel Henry [aut, cre], Hadley Wickham [aut], mikefc [cph] (Hash implementation based on Mike's xxhashlite), Yann Collet [cph] (Author of the embedded xxHash library), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.