On my Ubuntu 14.04, I keep getting this error. 3 hours on it & very annoying. I attempt to set & reset env variables.
"R did not return any output when queried for directory location information; Unable to determine R home directory"
:~$ env|grep "^R_*" |more ## Pls note that all env variables are on .profile
RSTUDIO_WHICH_R=/opt/anaconda/bin/R
R_LIBS=/opt/Rpkg
R_HOME_DIR=/opt/anaconda/lib64/R/
R_HOME=/opt/anaconda/lib/R
:~$ R
R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
Microsoft R Open 3.2.3
:~$ R --vanilla --slave -e "cat(paste(R.home('home'), R.home('share'), R.home('include'), R.home('doc'), sep = ':'))"
/opt/anaconda/lib/R:/opt/anaconda/lib/R/share:/opt/anaconda/lib/R/include:/opt/anaconda/lib/R/doc:~$ rstudio --rsession-which-r='/opt/anaconda/bin/R'
:~$ uname -a
Linux IQ007 3.13.0-86-generic #131-Ubuntu SMP Thu May 12 23:33:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linu
Thanks much in advance!