Temporarily change system environment variables.
with_envvar(new, code, action = "replace")local_envvar(new, action = "replace", .local_envir = parent.frame())
[named character]
New environment variables
[any]
Code to execute in the temporary environment
should new values "replace"
, "prefix"
or
"suffix"
existing variables with the same name.
[environment]
The environment to use for scoping.
[any]
The results of the evaluation of the code
argument.
if NA
is used those environment variables will be unset.
If there are any duplicated variable names only the last one is used.
withr
for examples