Description Usage Arguments Value Note Examples
Run Expression In a Temporary Directory
1 | runInTempDir(expr, temp_dir = tempdir(), prefix = "temp")
|
expr |
Expression to be evaluated in a temporary directory. |
temp_dir |
Optional. Path to temporary main directory. Default tempdir() |
prefix |
Optional. String that will be used as prefix for the temporary subfolder. |
Returns invisibly the last value evaluated in the expression.
Working directory will be change to temporary subfolder. Once the evaluation of the expression is finished, the working directory will be restored and the temporary subfolder (with its contents) will be deleted. The temporary main directory will remain untouched.
1 2 | temp_wd = runInTempDir({getwd()})
temp_wd
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.