.First <- function() { ...... }
--no-site-file
was given. The name of this file is taken from the
value of the `RPROFILE' environment variable. If that variable is
unset, the default is `$RHOME/etc/Rprofile'.
Then, unless --no-init-file
was given, R searches for a file
called `.Rprofile' in the current directory or in the user's home
directory (in that order) and sources it.
It also loads a saved image from `.RData' in case there is one
(unless --no-restore
was specified).
Finally, if a function .First
exists, it is executed as
.First()
.
The functions .First
and .Last
can be defined in the appropriate startup profiles or reside in
`.RData'.
.Last
for final actions before termination.