0
votes

I was using R installed on a Linux server using SSH. Everything was fine, but now I have been denied access to temp folder and if I am loading R it is giving error cannot create 'R_TempDir', as it can't create the temp folder.

Can you please tell me how to create own local temp folder so that R can create temporary directory there ?

2
to use setwd, I have to first use R and I am not able to use R itself. - Himanshu Rai
This worked for me: export TEMP=./ - Himanshu Rai

2 Answers

0
votes

You can try to set one of these environment variable :

TMPDIR, TMP, TEMP:

Consulted (in that order) when setting the temporary directory for the session: see tempdir. TMPDIR is also used by some of the utilities see the help for build

by doing for instance :

export TMPDIR=/tmp

source

0
votes

Hope this answers. From what I understand, I just thought that you could use .bashrc files in your /home/username/ directory

~# nano /home/username/.bashrc

You can put the command to create the folder inside this .bashrc file by just adding this line mkdir /your/dir/path/yourDir This file is just like an autorun file which run everytime you upstart your linux server

But this is just working per user setting