Re: [R] Question: about loading a new package

From: Ted Harding <>
Date: Thu, 14 Feb 2008 13:48:33 +0000 (GMT)

On 14-Feb-08 13:23:17, Stefano Sofia wrote:
> I am using R Version 2.3.1 (2006-06-01) in Linux with Ubuntu 7.4.
> I installed a new package with
> R CMD INSTALL -l /usr/lib/R/library newpackage.tar.gz
> Each time I run R I need to load this new package typing
> library(newpackage).
> My question is: how can I automatically load this new package
> once for ever?
> I read the manual but I have not been able to find the solution to
> that.
> thank you
> Stefano

Since you are using Linux, your home directory (e.g. /home/stefano) will contain a file .Rprofile (which you won't normally see unless you run the Linux command ls -a).

Edit this file so that it includes the line


(and, while you're at it, anything else that you would like to be done every time you start R).

Hoping this helps,

E-Mail: (Ted Harding) <> Fax-to-email: +44 (0)870 094 0861
Date: 14-Feb-08                                       Time: 13:48:30
------------------------------ XFMail ------------------------------

______________________________________________ mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 14 Feb 2008 - 14:27:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 14 Feb 2008 - 14:30:14 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive