in_dir {xfun} | R Documentation |
Evaluate an expression under a specified working directory
Description
Change the working directory, evaluate the expression, and restore the working directory.
Usage
in_dir(dir, expr)
Arguments
dir |
Path to a directory. |
expr |
An R expression. |
Examples
library(xfun)
in_dir(tempdir(), {
print(getwd())
list.files()
})
[Package xfun version 0.46 Index]