R-alpha: Rprofiles

Kurt Hornik Kurt.Hornik@ci.tuwien.ac.at
Tue, 22 Apr 1997 18:30:52 +0200

>>>>> Peter Dalgaard BSA writes:

> The x11() window can be a nuisance to have popping up at startup (esp.
> on small screens) when you're not working with graphics. However,
> currently you can't get rid of it without modifying the systemwide
> Rprofile. 

> Current logic is:

> Run $RHOME/library/Rprofile
> if ./.Rprofile exists
> 	run it
> else if $HOME/.Rprofile exists
> 	run that
> endif

> I think it should be

> Run $RHOME/library/Rsetup
> if ./.Rprofile exists
> 	run it
> else if $HOME/.Rprofile exists
> 	run that
> else if $RHOME/library/Rprofile exists
> 	run that
> endif

> i.e. essential system initialisation goes in Rsetup, the rest in
> Rprofile, which can be overridden by the user.

I more or less agree, BUT:

I'd like (in the future) to have the system-wide Rprofile searched in a
site-specific location as well (similar to Emacs, following the idea of
keeping the distribution and the site-specific things apart).

So it would be
	system-wide Rsetup (which should basically be platform-specific
	  stuff, cause otherwise it could go into base as well?)
        if .Rprofile exists run it else
	if ~/.Rprofile exists run it else
        if Rprofile exists on the default library search path, run it

and that search path could e.g. specify all `library' trees with a
compile-time default of


and settable at run time via e.g. the environment variable R_PATH.

> Currently, the line

> if(interactive()) x11()

> is the candidate to move from one to the other. BTW, it really should read

> if(interactive() && getenv("DISPLAY")!="") x11()

Correct.  We've been making the same change with all upgrades :-)

> [BTW2: getenv() implemented using system()? is that really necessary?]

r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch