set_temp_wd {wrappr} | R Documentation |
Sets a temporary working directory within the function scope
Description
Sets a temporary working directory within the function scope
Usage
set_temp_wd(
temp_cwd,
func,
...,
err_msg = "An error has occured in the function set_temp_wd"
)
Arguments
temp_cwd |
character. Folder path to temporarily set the working directory |
func |
function. A function that used a directory path |
... |
Additional arguments to be passed to the param func. |
err_msg |
character. Message sent to stop function if an error occurs. |
Value
Unknown. The return type from the param func.
Examples
## Not run:
temp_wd <- "example/folder/address/to/change"
get_data <- set_temp_wd(temp_wd, read.csv, file = "file.csv")
## End(Not run)
[Package wrappr version 0.1.0 Index]