[R] Upgrading R means I lose my packages

bartjoosen bartjoosen at hotmail.com
Fri Aug 29 11:20:50 CEST 2008


On my windows XP machine, if you uninstall R-2.7.1, the libraries which
doesn't come with the original installation remain in the folder C:\Program
Files\R\R-2.7.1\library.
So I first uninstall R-2.7.1, then install R-2.7.2, copy the remaining
packages from the R-2.7.1 folder to the R-2.7.2 library folder.
In R update packages.

Bart



Robert A LaBudde wrote:
> 
> At 04:12 AM 8/28/2008, ONKELINX, Thierry wrote:
> 
>>On a windows machine you get the same problem. Useless one uses tha same
>>trick as Rolf suggested: don't install the packages in the default
>>directory and set R_LIBS to that directory. Then all you need to do
>>after an upgrade is to set R_LIBS in the new version and run
>>update.package(checkBuilt = TRUE). Given Rolf's suggestion I suppose
>>this trick will work on a Mac too.
> 
> What I do in installing a new version of R on a Windows system is as
> follows:
> 
> 1. In the "c:\Program Files\R" folder, the installation is in a 
> subfolder labeled by the version, such as "R-2.7.1".
> 
> 2. I leave the old (say, 2.7.1) version installed, and install the 
> new version (say, 2.7.2). This leaves the old subfolder "R-2.7.1" 
> intact, and creates a new one "R-2.7.2".
> 
> 3. I use a file-compare utility (in my case, Beyond Compare, which I 
> recommend), to compare the subfolders "C:\Program 
> Files\R\R-2.7.1\library" and "C:\Program Files\R\R-2.7.2\library". I 
> set the comparison to find files present or newer in the 2.7.1 folder 
> vs. the 2.7.2. Then I copy all such files over.
> 
> 4. At this point, the 2.7.2 has the same or new packages than 2.7.1, 
> most or all of which will work.
> 
> 5. I use the "Packages|Update Package ..." to update packages to 2.7.2.
> 
> 6. Then I delete the 2.7.1 subfolder.
> 
> You need Administrator rights to do this.
> 
> 
> 
> 
> ================================================================
> Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: ral at lcfltd.com
> Least Cost Formulations, Ltd.            URL: http://lcfltd.com/
> 824 Timberlake Drive                     Tel: 757-467-0954
> Virginia Beach, VA 23464-3239            Fax: 757-467-2947
> 
> "Vere scire est per causas scire"
> 
> ______________________________________________
> 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Upgrading-R-means-I-lose-my-packages-tp19193056p19216548.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list