Hi I am testing a package, and after I make changes, I have to close R and open R again to load the new version (same version number) of the package I am working on. So my question: is there a function which removes a package, i.e library(myPackage)> Package is loadedunlibrary(myPackage)> package is not loaded any moreThanks, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug [[alternative HTML version deleted]]
Hi Rainer, for better or worse "unlibrary" actually is done by detach in R, ?detach #first example cheers Am 05.10.2011 15:04, schrieb Rainer M Krug:> Hi > > I am testing a package, and after I make changes, I have to close R and open > R again to load the new version (same version number) of the package I am > working on. So my question: > > is there a function which removes a package, i.e > > library(myPackage) > >> Package is loaded > unlibrary(myPackage) > >> package is not loaded any more > > Thanks, > > Rainer >-- Eik Vettorazzi Department of Medical Biometry and Epidemiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 -- Pflichtangaben gem?? Gesetz ?ber elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universit?tsklinikum Hamburg-Eppendorf; K?rperschaft des ?ffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Pr?l?, Prof. Dr. Dr. Uwe Koch-Gromus
Hi Rainer, On Wed, Oct 5, 2011 at 9:04 AM, Rainer M Krug <r.m.krug at gmail.com> wrote:> Hi > > I am testing a package, and after I make changes, I have to close R and open > R again to load the new version (same version number) of the package I am > working on. So my question: > > is there a function which removes a package, i.e > > library(myPackage) > >> Package is loaded > unlibrary(myPackage)The function is 'detach(package:<package_to_unlibrary>)', possibly with the unload option. Best, Ista> >> package is not loaded any more > > Thanks, > > Rainer > > -- > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, > UCT), Dipl. Phys. (Germany) > > Centre of Excellence for Invasion Biology > Stellenbosch University > South Africa > > Tel : ? ? ? +33 - (0)9 53 10 27 44 > Cell: ? ? ? +33 - (0)6 85 62 59 98 > Fax (F): ? ? ? +33 - (0)9 58 10 27 44 > > Fax (D): ? ?+49 - (0)3 21 21 25 22 44 > > email: ? ? ?Rainer at krugs.de > > Skype: ? ? ?RMkrug > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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. >-- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org