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?)....) How do I unload a library? I don't mean getting ride of it permanently but just to unload it for the time being. 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. Thanks in adv. Horace

see ?detach Horace Tso <Horace.Tso@pgn.com> 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?)....) How do I unload a library? I don't mean getting ride of it permanently but just to unload it for the time being. 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. Thanks in adv. Horace ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --------------------------------- [[alternative HTML version deleted]]

Sachin, I did try that, ex detach(zoo) Error in detach(zoo) : invalid name detach("zoo") Error in detach("zoo") : invalid name But zoo has been loaded, sessionInfo() Version 2.3.1 (2006-06-01) i386-pc-mingw32 attached base packages: [1] "methods" "datasets" "stats" "tcltk" "utils" "graphics" [7] "grDevices" "base" other attached packages: tseries quadprog zoo MASS Rpad "0.10-1" "1.4-8" "1.2-0" "7.2-27.1" "1.1.1" Thks, H.>>> Sachin J <sachinj.2006 at yahoo.com> 8/25/2006 12:56 PM >>>see ?detach Horace Tso <Horace.Tso at pgn.com> 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?)....) How do I unload a library? I don't mean getting ride of it permanently but just to unload it for the time being. 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. Thanks in adv. Horace ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --------------------------------- [[alternative HTML version deleted]] ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

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, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595

try detach("package:zoo") Sachin Horace Tso <Horace.Tso@pgn.com> wrote: Sachin, I did try that, ex detach(zoo) Error in detach(zoo) : invalid name detach("zoo") Error in detach("zoo") : invalid name But zoo has been loaded, sessionInfo() Version 2.3.1 (2006-06-01) i386-pc-mingw32 attached base packages: [1] "methods" "datasets" "stats" "tcltk" "utils" "graphics" [7] "grDevices" "base" other attached packages: tseries quadprog zoo MASS Rpad "0.10-1" "1.4-8" "1.2-0" "7.2-27.1" "1.1.1" Thks, H.>>> Sachin J 8/25/2006 12:56 PM >>>see ?detach 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?)....) How do I unload a library? I don't mean getting ride of it permanently but just to unload it for the time being. 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. Thanks in adv. Horace ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --------------------------------- [[alternative HTML version deleted]] ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --------------------------------- [[alternative HTML version deleted]]

Aah, that works. The missing "package:..." H.>>> Sachin J <sachinj.2006 at yahoo.com> 8/25/2006 1:16 PM >>>try detach("package:zoo") Sachin Horace Tso <Horace.Tso at pgn.com> wrote: Sachin, I did try that, ex detach(zoo) Error in detach(zoo) : invalid name detach("zoo") Error in detach("zoo") : invalid name But zoo has been loaded, sessionInfo() Version 2.3.1 (2006-06-01) i386-pc-mingw32 attached base packages: [1] "methods" "datasets" "stats" "tcltk" "utils" "graphics" [7] "grDevices" "base" other attached packages: tseries quadprog zoo MASS Rpad "0.10-1" "1.4-8" "1.2-0" "7.2-27.1" "1.1.1" Thks, H.>>> Sachin J 8/25/2006 12:56 PM >>>see ?detach 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?)....) How do I unload a library? I don't mean getting ride of it permanently but just to unload it for the time being. 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. Thanks in adv. Horace ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --------------------------------- [[alternative HTML version deleted]] ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --------------------------------- [[alternative HTML version deleted]] ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.