Description Usage Arguments Details Value Examples
Creates a temporary file securely with a system call to mktemp. A version of mktemp from GNU coreutils or BSD is required.
1 |
template |
the template, which must end with at least 3 'X's. Only alphanumeric characters, underscore and dots are allowed. |
tmpdir |
the containing temporary folder. Only alphanumeric characters, underscore and dots are allowed. |
R's tempfile
function makes no guarantee against race conditions, where the same temp file could be generated by different R processes. This is a problem especially 26 *in parallel environments. By contrast, file names generated by mktemp
are guaranteed to be unique.
Note that the file is created before the function returns and must be removed manually afterwards.
the newly created file name
1 2 | tmpfile <- mktemp()
file.remove(tmpfile)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.