[R] Environment variable defined in .bashrc is not recognized by R

Luca Cerone luca.cerone at gmail.com
Tue Apr 1 10:41:44 CEST 2014


Dear all,
in my .bashrc file I have set the environment variable R_HISTFILE like this:

 export R_HISTFILE="$HOME/.Rhistory"

I then use it in my .Rprofile to have R writing all the history in a
single file, rather than on a per directory basis.
However this doesn't work becaus R_HISTFILE is not recognized by R.

If I type: Sys.getenv("R_HISTFILE")
the output is: ""

How can I get R recognizing environment variables?

Best,
Luca

-- 
Luca Cerone

Skype: luca.cerone




More information about the R-help mailing list