powered by
Change the working directory, evaluate the expression, and restore the working directory.
in_dir(dir, expr)
Path to a directory.
An R expression.
library(xfun) in_dir(tempdir(), { print(getwd()) list.files() })
Run the code above in your browser using DataLab