My Procedure for Upgrading R: Windows XP with StatET

August 5, 2009
By

(This article was first published on Jeromy Anglim's Blog: Psychology, Statistics, & Research Design, and kindly contributed to R-bloggers)

R releases upgrades around every 6 months. I run R on Windows XP using the StatET plug-in and Eclipse. This is my current upgrade procedure. I've posted this mainly for my own future reference. But who knows? it might be useful for someone else:



1. Download the new version of R for Windows from my local mirror

2. Install the new version

3. In order to copy over my library of pre-existing packages. I use one of the batch files called 'movedir.bat' from here
I keep 'movedir.bat' in the R directory.
I then have my own batch file, which I call 'runmovedir.bat' with the following code:
cd \Program Files\R
movedir R-2.7.1\library R-2.9.1\library
where I update old and new version numbers to correspond to the current update.

4. I copy across the "Rprofile.site" (located in for example 'Program Files\R\R-2.7.1\etc') from the old version to the new version

5. I update Eclipse so that it refers to the updated version of R:
Go to menu in Eclipse: Run >> Run Configuration
In the dialog box: R Console > R ; Then the R Config Tab >> Configure
I edit the "Location (R_HOME)" to refer to the current version number

6. I update the environment setting on my computer; (I'm not actually sure if this is necessary for how I currently use R, but I figure that it can't hurt)

a. Hold down Windows & Pause/Break
b. Advanced Tab & Environment Variables
c. System Variables: Path: and change the reference from the old version to the new version.

7. I then Update my packages as set out here
This code is entered into R
update.packages(checkBuilt=TRUE, ask=FALSE)

8. I then uninstall the old version of R.

To leave a comment for the author, please follow the link and comment on his blog: Jeromy Anglim's Blog: Psychology, Statistics, & Research Design.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.