tempfile {base} | R Documentation |
Create Unique Names for (Temporary) Files
Usage
tempfile(pattern = "file")
Arguments
pattern |
a character vector giving the initial part of the name. |
Details
The filenames will be in the directory given by the first found of
the environment variables TMP
, TEMP
and R\_USER
(see Rconsole
). If the path to the directory contains
a space in any of the components, the path returned will use the
shortnames version of the path.
Value
A character vector giving the names of possible (temporary) files. The
names are guaranteed to be unique among calls to tempfile
in an R
session, and to not exist as files. Note that no files are generated
by tempfile
.
See Also
unlink
for deleting files.