[R] Re: loading packages at startup (was no subject)

John Fox jfox at mcmaster.ca
Tue Feb 19 14:24:27 CET 2002


Dear Christopher:

At 10:30 PM 2/18/2002 -0500, Christopher W. Edge wrote:

>I'm a new R users (although I have a little experience with S+).  I am 
>using the latest version (1.4.1) of R on a Windows 2000 system.
>
>I have obtained several of the additional R packages ("modules") and would 
>like to know how to permanently install them.  What I am after is 
>something similar to the following in S+
>
> > .First <- function() { module("module_name") }
>
>This loads a given module at the start of the S+ session so that it is 
>always available.  I'm sure there must be a way to do this in R, but I 
>have not been able to find it in the documentation or on the FAQ web site.
>

There are several ways to load packages, or execute other commands, at 
startup. On a single-user Windows system, probably the easiest solution is 
to edit the Rprofile file in the etc subdirectory, adding library commands 
to the file.  Because there's some overhead, it's only sensible to do this 
if you want the libraries to be available continuously.

I hope that this helps,
  John

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list