Next: Memory management in S
Up: Getting started
Previous: Data objects, memory, and
- R
- The file $HOME/.Renviron can be used to set environment
variables within R. The current value of environment variables can
be seen using >options(). For example, my .Renviron
file contains:
R_PAPERSIZE=letter
R_LIBS=~
/R/library # use so it knows to look in
this directory for libraries
WIDTH=150
- The file $HOME/.Rprofile is sourced when R starts. This
is a handy place to call libraries that you use often and define functions.
For example, my .Rprofile file contains:
library(ts) # for acf
library(mgcv) # for GAMs
source("~
paciorek/R/utils.q")
- You can also create .First files in .Rprofile that
are called on startup. Or .First files can live in .RData.
- Finally, note that you can have local .Renviron and .Rprofile
files that are called only when starting R in the particular directory.
- Splus
Initialization code for Splus in Linux is in $HOME/MySwork/.S.init.
Any S code in this file is run at the beginning of your S session,
regardless of which .Data directory you are using.
Next: Memory management in S
Up: Getting started
Previous: Data objects, memory, and
Chris Paciorek
2006-04-02