Re: R-alpha: R initialization files

Ross Ihaka (
Wed, 20 Nov 1996 16:15:29 +1300 (NZDT)

From: Ross Ihaka <>
Date: Wed, 20 Nov 1996 16:15:29 +1300 (NZDT)
Message-Id: <>
Subject: Re: R-alpha: R initialization files

Friedrich Leisch writes:
> I have patched R such that it sources two alternative init files:
> 	~/.Rprofile
> of if this does not exist
> 	$RHOME/library/Rprofile

I have included this, but with the following modifications:

 1. We first look for $RHOME/library/Rprofile
    If we find it we execute the statements in it.

 2. We look for ./.Rprofile and ~/.Rprofile and execute the statements
    the first of these we discover.

We will use $RHOME/library/Rprofile to do things like starting the
graphics device driver and help system (when we have one).

The user can do any initialization they want to in there .Rprofile

There are problems with .First on the Macintosh because of the way
that startup occurs - double clicking on a document is not detected
until after the event loop begins running - i.e. until parsing of a
user's typed input begins.  Thus the Rprofile solution may be be more
portable.  We will continue to support .First on those platforms where
it works.  Startup occurs as follows

 1. The "base" library is loaded.

 2. Saved data (i.e. .RData is loaded)

 3. The system Rprofile is executed

 4. The user .Rprofile is executed

 5. The .First function is executed

 6. Typed user input is parsed and executed

r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: