Examples for 'rlang::local_bindings'


Temporarily change bindings of an environment

Aliases: local_bindings with_bindings

Keywords:

### ** Examples

foo <- "foo"
bar <- "bar"

# `foo` will be temporarily rebinded while executing `expr`
with_bindings(paste(foo, bar), foo = "rebinded")
[1] "rebinded bar"
paste(foo, bar)
[1] "foo bar"

[Package rlang version 1.1.4 Index]