[R] change the R home directory

Da Zheng zhengda1936 at gmail.com
Sat Apr 8 19:40:13 CEST 2017


By default, the home directory of R is "/usr/lib/R" in Ubuntu.
Everything works fine.

However, when I installed Jupyter notebook and the R kernel with
anaconda2, it seems the R home directory is changed to some directory
in anaconda2. This messes up compilation and linking. I wonder how I
change the R home directory back to the default directory.

I tried to set R_HOME directly, When I start R, I see a warning message:
WARNING: ignoring environment value of R_HOME

I don't understand why R wants to ignore the environment value.
Of course, the R home directory isn't changed.
> R.home()
[1] "/home/zhengda/anaconda2/lib/R"

What is the right way of changing the R home directory?


More information about the R-help mailing list