Re: [R] Quickie : unload library

From: Prof Brian Ripley <>
Date: Sat 26 Aug 2006 - 06:15:28 EST

On Fri, 25 Aug 2006, Horace Tso wrote:

> Dear list,
> I know it must be obvious and I did my homework. (In fact I've
> RSiteSearched with keyword "remove AND library" but got timed
> out.(why?)....)

Probably because the site is offline.

> How do I unload a library? I don't mean getting ride of it permanently
> but just to unload it for the time being.

Do you mean 'package' (see detach and unLoadNamespace) or 'library' (see dyn.unload and library.dynam.unload)?

> A related problem : I have some libraries loaded at startup in .First()
> which I have in .Rprofile. Now, I exited R and commented out the lines
> in .First(). Next time I launch R the same libraries are loaded again.
> I.e. there seems to be a memory of the old .First() somewhere which
> refuses to die.

Are you restoring a workspace containing .First? Always try with --vanilla to check.

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sat Aug 26 06:34:00 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 26 Aug 2006 - 08:26:22 EST.

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