I am a user (no admin privileges) of an Ubuntu 12.04.4 machine running R 3.1.
I find I can't start R because Fatal error: cannot create 'R_TempDir
. The problem is pretty simple (and already documented here): there's not enough disk space to initialize R temporary directory. Indeed:
df /tmp
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda1 10320184 10284088 0 100% /
But then I have plenty of space on a different partition (/dev/vdb
). How could I tell R to create a temporary folder in a different location?
Since I can't start R, I tried to set in my .Rprofile
.First <- function(){
## other stuff
tempdir("path/to/plenty/of/space/tmp")
## other stuff
}
Yet it doesn't work.
Error in tempdir("path/to/plenty/of/space/tmp") :
unused argument ("path/to/plenty/of/space/tmp")
Calls: .First -> tempdir
Execution halted
EDIT: Question already answered here.
Create a .Rprofile
and add this line TMP = '<your-desired-tempdir>'