however when I run, I do not see anything... I see a .Renviron in the file path set under file = .... but I dont see any temp files. how do I get all temp files in a certain directory? thank u!!!
As a result of executing your write statement I expect that the contents of your .Renviron file is
TMP = 'C:/users/lil/Rcode/Temp File'
The next time you restart R the environment variable TMP points to the indicated folder.
Each time R is started it will use a subfolder of the indicated folder for temporary files.
Which folder that is can be seen by using tempdir().
At least that is my understanding. If it does not work in this way I would check the following
be sure that the indicated folder already exists
does the .Renviron file contains the correct statement
duplicate the statement and replace in the second statement TMP by TEMP
(never sure which one would work)
use the standard Windows backslashes (duplicate them in R statements like the above write)
remove the single quotes around the indicated folder (why would Windows need them?)
So it looks like it works for me as described.
The only thing that amazes me that I had to duplicate the backslashes in .Renviron otherwise they disappear. Apparently the .Renviron file is handled as an R file with text strings (??)