Colin Gillespie shows how you can customize R via the .Rprofile
file:
Every time R starts, it runs through a couple of R scripts. One of these scripts is the
.Rprofile
. This allows users to customise their particular set-up. However, some care has to be taken, as if this script is broken, this can cause R to break. If this happens, just delete the script!Full details of how the .Rprofile works can be found in my book with Robin on Efficient R programming. However, roughly R will look for a file called
.Rprofile
first in your current working directory, then in your home area. Crucially, it will only load the first file found. This means you can have per project Rprofile.
Click through for a sample R profile which has a lot going on.