[R] Loading user defined functions autometically each time I start R

Richard.Cotton at hsl.gov.uk Richard.Cotton at hsl.gov.uk
Wed Feb 27 11:06:38 CET 2008

> I wrote some user defined function for my own. Now I want to get a 
> so that every time I start R, those function will automatically be 
loaded in
> R without manually copying pasting. Can gurus here pls tell me how to do
> that? Or I have to build my own packages bundled with those functions.

These instructions are for Windows, there may be a slight difference on 
other platforms.

In R_HOME\etc you should have a file named RProfile.site.

Inside this file, you can define a .First function, which sources your 
functions, e.g.

.First <- function()

See also:
Section 10.8 of the Intro to R manual, and


Mathematical Sciences Unit


This message contains privileged and confidential inform...{{dropped:20}}

More information about the R-help mailing list