with_dir {withr} | R Documentation |
Working directory
Description
Temporarily change the current working directory.
Usage
with_dir(new, code)
local_dir(new = list(), .local_envir = parent.frame())
Arguments
new |
|
code |
|
.local_envir |
|
Value
[any]
The results of the evaluation of the code
argument.
See Also
withr
for examples
Examples
getwd()
with_dir(tempdir(), getwd())
[Package withr version 3.0.0 Index]