I’m wondering
- does launching R.exe on windows create temporary files and
- does interpreting something like
x <- 5write to those temporary files?
If temporary files are created where are they stored and what happens if I launch several instances of R.exe? Will they share and overwrite each others temporary files?
Each instance of R gets its own temporary directory. You can see that pretty easily below the default temporary directory on your system (eg
/tmpfor me; on Windows I usually setTEMPDIRandTMPDIRtoC:\TMPand find them there; I forget where they go otherwise). But when you invoketempfile()ortempdir()you can infer the path:So the R session in which I typed this uses
/tmp/RtmpDVDtmj/.The directory name is randomized and safe from other R instances running at the same time.
At exit of R, the directory is purged.
And no, the simple assignment
x <- 5will not involve a temporary file.