Skip to content
Prev 2644 / 63424 Next

R's startup : .Rprofile & .Renviron -- info and RFC

On Fri, 24 Sep 1999, Martin Maechler wrote:

            
On Windows it is read as a set of NAME=VALUE statements.
Yes, no problem.
Sorry, I don't see that as the only way in the rw-FAQ, but I do see how to
use .Renviron under Q2.2.

The current position is:

R figures out a value for R_USER.
It (effectively) reads its environment
It then reads R_USER/.Renviron as NAME=VALUE pairs
It then reads NAME=VALUE pairs off the command line.
It then processes --nsize etc.

The algorithm for R_USER is

If set, use it.
Else if HOME is set, use that (it normally is not).
Else if HOMEDRIVE and HOMEPATH are set (they usually are on NT) use
 HOMEDRIVE\HOMEPATH (the docs have this wrong, I see).
Else use the startup directory.

All we would need is to look for ./.Renviron then R_USER/.Renviron.