I'm working on a Windows machine and I would like to change the location where the temporary files are stored (from C: to G: drive).
I have tried doing so in three different ways:
write("TMPDIR = G:/temp", file=file.path(Sys.getenv('R_USER'), '.Renviron'))
or
tempfile(pattern = ".Renviron", tmpdir = "G:/temp")
or
tempfile(tmpdir = "G:/temp")
but in each case when I go ahead and check with tempdir()
I find that the location is still the initial one.
What am I doing wrong?