Examples for 'rlang::env_has'


Does an environment have or see bindings?

Aliases: env_has

Keywords:

### ** Examples

parent <- child_env(NULL, foo = "foo")
env <- child_env(parent, bar = "bar")

# env does not own `foo` but sees it in its parent environment:
env_has(env, "foo")
  foo 
FALSE 
env_has(env, "foo", inherit = TRUE)
 foo 
TRUE 

[Package rlang version 1.1.4 Index]