powered by
Sets a temporary working directory within the function scope
set_temp_wd( temp_cwd, func, ..., err_msg = "An error has occured in the function set_temp_wd" )
Unknown. The return type from the param func.
character. Folder path to temporarily set the working directory
function. A function that used a directory path
Additional arguments to be passed to the param func.
character. Message sent to stop function if an error occurs.
if (FALSE) { temp_wd <- "example/folder/address/to/change" get_data <- set_temp_wd(temp_wd, read.csv, file = "file.csv") }
Run the code above in your browser using DataLab