[R] Upgrade R?

Duncan Murdoch murdoch.duncan at gmail.com
Tue Nov 15 01:50:35 CET 2011


On 14/11/2011 5:42 PM, Cem Girit wrote:
> Hello all,
>
> 	I received many emails to my post on this issue. None of the answers
> were able to resolve all the issues experienced by many but helped me to
> understand the issues. . But consıderıng the avaılable OSs to install on,
> many packages to install, and the fact that R is a product of open source
> effort, it is still impressive that it works. The desirable solution surely,
> is to have a mnu entry in R GUI to update the whole while managing library
> packages with a dialog.
>
> 	The problem Kevin and I had in removing the old R version 2.13.1 is
> not solved. We had to delete the old version and remove the registry entries
> manually since the Window's uninstall program gives an error using the
> available uninstall.dat file and does not uninstall it.
>
> 	In order to help others in similar issues, I gathered all the
> responses I received on this issue (thankfully from Kevin Burton, Bert
> Gunter, Uwe Ligges, Eric  Neuwirth, Richard M. Heiberger, David Wolfskill,
> R. Michael Weylandt and Thomas Baier) and compiled them below. I hope, the
> experts, in the light of these issues, would update the R-Manuals/Online
> help etc. for successful updates.

This expert is not going to do anything, because you haven't actually 
given a useful suggestion for what to do.

You haven't given us a reproducible example of what to do to illustrate 
that there's a bug.  I just installed R 2.13.1 and uninstalled it. 
Presumably you did something in between the install and the uninstall 
that caused the uninstall to fail, but I'm not going to try to figure 
out what.  If you want me to fix this, tell me what you did that 
triggers the bug.

Or at least suggest some specific changes to fix things.

Or just ignore it.  Leave the old version installed.  Disk space is cheap.

I could make some random change and claim to have fixed your problem, 
but even if I really did I'd have no way to know that I did.

So I'm not going to do anything.

Duncan Murdoch

>
> Updating to the new version of R:
>
> There are basically two strategies for R upgrading on windows.
>
> A) The first is to install a new R version and copy paste all the packages
> to the new R installation folder.
>
>       The following methods explain different ways to achieve this.
>
> 1. Run the following script in R-Console:
>
> 	>update.packages(checkBuilt=TRUE)
>
> 	This will update all the user installed packages to new version. But
> it will overwrite the old versions of the packages.
>
> 	Ref:
> http://cran.r-project.org/doc/manuals/R-admin.html#Installing-R-under-Window
>
>
> 2. First you install the new version, then run this in the old version:
>
> 	#--run in the old version of R
> 	setwd("C:/Temp/")
> 	packages<- installed.packages()[,"Package"]
> 	save(packages, file="Rpackages")
>
> 	Followed by this in the new version:
>
> 	#--run in the new version
> 	setwd("C:/Temp/")
> 	load("Rpackages")
> 	for (p in setdiff(packages, installed.packages()[,"Package"]))
> 	install.packages(p)
>
> 	Ref:
> http://stackoverflow.com/questions/1401904/painless-way-to-install-a-new-ver
> sion-of-r
> 	
> 3. Run the following command on R-console:
>
> 	>rownames(installed.packages())
> 	
> 	This will tell you the names of all packages of the version of R in
> which you are running the command.
> 	Then compare this list with the list given at
> http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Add_002dOn-Packages .
> 	The installed package differences between these two lists are the
> user installed packages.
>
> 4. The "Other" section on CRAN has an item called "batch files".
>
> 	In there is copydir.bat which allows you to copy packages from one
> version of R to another version.
> 	It will respect already installed packages in the destination
> directory and not overwrite them with possibly older versions.
>
> 	Ref: http://cran.r-project.org/ . Download batchfiles_0.6-6.zip from
> there.
> 	
> 5. If you want to install packages from SourceForge without overwriting them
> from CRAN:
>
> 	Ref:
> http://stackoverflow.com/questions/3971815/automagically-update-packages-ins
> talled-from-r-forge
>
> 6. If you also have statconnDCOM (rcom) installed, here are the recommend
> steps:
> 	
> 	a. Install the latest version of R
> 	
>      b. Copy your installed packages from the old version of R to the new
> version of R.
> 	
> 		copydir "c:\Program Files\R\R-2.3.1\library" "c:\Program
> Files\R\R-2.14.0\library"
> 	
>      c. Start R with the -vanilla command line option:
> 	
> 		"C:\Program files\R\R-2.14.0\bin\Rgui.exe" --vanilla
> 		
>      d. Update the packages:
> 	
> 		update.packages(checkBuilt=TRUE, ask=FALSE)
> 		
>      e. Configure R with the latest version of rcom:
>
> 		library(rcom)
> 		comRegisterRegistry()
>
> 	Ref:
> http://learnserver.csd.univie.ac.at/rcomwiki/doku.php?id=wiki:how_to_upgrade
> _r_with_our_packages_installed
> 	         Running comRegsterRegistry() gives NULL. Then the
> application using statConn works fine.
> 		
> B) The second is to have a global R package folder, each time synced to the
> most current R installation (thus saving us the time of copying the package
> library each we upgrade R)."How to upgrade R on windows XP - another
> strategy" which explains how to upgrade R using the simple two-liner
> codesource:
>
> 	
> source("http://www.r-statistics.com/wp-content/uploads/2010/04/upgrading-R-o
> n-windows.r.txt")
> 	New.R.RunMe()
> 	
> 	p.s: If this is the first time you are upgrading R using this
> method, then first run the following two lines on your old R installation
> (before running the above code in the new R intallation):
>
> 	
> source("http://www.r-statistics.com/wp-content/uploads/2010/04/upgrading-R-o
> n-windows.r.txt")
> 	Old.R.RunMe()
> 	
> 	Ref:
> http://www.r-statistics.com/2010/04/changing-your-r-upgrading-strategy-and-t
> he-r-code-to-do-it-on-windows/ 	
> 	
> http://www.r-statistics.com/2011/04/how-to-upgrade-r-on-windows-7/
>
>                          This  update leaves two library directories one in
> the "C:\Program Files\R\library" directory and the other in the "C:\Program
> Files\R\R-2.14.0\library" directory. Deleting the second makes R console
> confused since it cannot find even the basic library. But undeleting it, is
> extra ~0.5GB space.
> 		
> Uninstalling the old version of R:
>
> 	After all the packages are updated and the depended ones such as
> rcom were registered, the old version can be uninstalled through "Programs
> and Features" option of Windows.
> 	
> Problems with installing the new version and uninstalling the old version:
>
> 	There are many problems reported. Here are a few:
> 	
> 1. Windows 7 issues:
>
> 	Windows security, UAC, installation directories etc. See:
>
> 	Ref:
> http://www.r-statistics.com/2011/04/how-to-upgrade-r-on-windows-7/
>
> 2. Uninstalling error "Internal error: Cannot find utCompiledCode record for
> this version of uninstaller".
>
> 	You can delete the old installation directory and remove the
> registry entries manually or use a program such as CCleaner to remove the
> registry entries.
>
> Cem
>
>
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
> Behalf Of Gene Leynes
> Sent: Monday, November 14, 2011 4:43 PM
> To: r-help at r-project.org
> Cc: Kevin Burton
> Subject: Re: [R] Upgrade R?
>
> I have had similar problems.
>
> I have several installations of R and now I have no control over which one
> opens when I try opening a RData file.  The RGUI is registered more than
> once, but they all have the exact same appearance in the "choose programs"
> menu.
>
> It's become particularly annoying now that new versions of R seem to be
> published with ever increasing frequency.
>
>
>
> On Mon, Nov 14, 2011 at 10:11 AM, Kevin Burton
> <rkevinburton at charter.net>wrote:
>
>> I am also using statConn so I will let you know if I hear anything new.
>>
>> -----Original Message-----
>> From: Cem Girit [mailto:girit at comcast.net]
>> Sent: Monday, November 14, 2011 8:52 AM
>> To: 'Kevin Burton'
>> Cc: r-help at r-project.org
>> Subject: RE: [R] Upgrade R?
>>
>> Hello Kevin,
>>
>>         Thank you. I will delete the folder and run an application
>> called CCleaner (free). That will remove all the broken registry entries.
>>
>>         There should be a problem free update path for R installation.
>> As you rightfully mentioned the R- manual is not clear about package
>> update issues. I received many helpful suggestions on the update path
>> but some of the them were contradictory in the order of steps to be
>> taken.  I am also using statConn (DCOM) interface for programming.  So
>> my problems are multifold.  I will compile the answers I received on
>> the R version update issue and publish them so that that the experts
>> could put them into more effective use.
>>
>>         Sincerely,
>>
>> Cem
>>
>>
>> -----Original Message-----
>> From: Kevin Burton [mailto:rkevinburton at charter.net]
>> Sent: Sunday, November 13, 2011 4:11 PM
>> To: 'Cem Girit'
>> Subject: RE: [R] Upgrade R?
>>
>> I don't know if it was correct but I just removed the directory and
>> then searched and removed all instances in the registry that referred
>> to 2.13.1 (in my case searching for this seemed to only return
>> references to 'R'). I have since been given some links that address
>> specific registry entries but I haven't had any problem yet with my
>> 'slash and burn' approach. It removed it from the 'Install/Uninstall'
>> list with windows so it seems to have be removed and the disk space that
> 2.13.2 took up has been reclaimed.
>>
>> Hope this helps. Let me know if you find any more definitive answers.
>>
>> Thanks.
>>
>> Kevin
>>
>> -----Original Message-----
>> From: Cem Girit [mailto:girit at comcast.net]
>> Sent: Saturday, November 12, 2011 6:33 PM
>> To: 'Kevin Burton'
>> Subject: RE: [R] Upgrade R?
>>
>> Hello Kevin,
>>
>>         I am getting the same error "utCompiledCode..." since I
>> installed
>> R2.14 while R2.13 existed.  How did you get rid of R2.13 eventually?
>> Did you just delete it? If so, how did you clean the registry?
>>
>>         Thank you,
>>
>> Cem
>>
>> -----Original Message-----
>> From: r-help-bounces at r-project.org
>> [mailto:r-help-bounces at r-project.org]
>> On
>> Behalf Of Kevin Burton
>> Sent: Thursday, November 10, 2011 11:54 AM
>> To: 'jose Bartolomei'; 'R Help'
>> Subject: Re: [R] Upgrade R?
>>
>> The problem with this documentation is two-fold. One it seems to
>> concentrate on building from source which I don't need. Two it doesn't
>> address the upgade. I have a number of packages and so I need to do
>> what has been suggested and install the latest version *first*. Then
>> copy the libraries (packages). Then uninstall the previous version. It
>> is on this last step that I am stuck on right now. The last link on
>> uninstalling R manually was what I needed. Thank you.
>>
>>
>>
>> Kevin
>>
>>
>>
>> From: jose Bartolomei [mailto:surfprjab at hotmail.com]
>> Sent: Thursday, November 10, 2011 10:19 AM
>> To: rkevinburton at charter.net; R Help
>> Subject: RE: [R] Upgrade R?
>>
>>
>>
>> Hi,
>> Don't know if this will help you but...
>> In my short experience and following the guidelines you should first
>> uninstall R.
>>
>>
>> http://cran.r-project.org/doc/manuals/R-admin.html#Installing-R-under-
>> Window
>> s
>>
>> Unistall it from the Windows control panel.
>>
>> The old R version libraries file will be kept on machine.
>> For example : C:\Program Files\R\R-2.13.0\library
>>
>> Then install the new version via:
>>
>> http://cran.r-project.org/doc/manuals/R-admin.html#Installing-R-under-
>> Window
>> s
>>
>> You can copy/paste libraries from the old version R library file to
>> the new one.
>> C:\Program Files\R\R-2.14.0\library
>>
>> There is too an function named:
>> ?update.packagee
>>
>> If above was what you did, then there is a post on Uninstalling R
> manually:
>>
>>
>> http://learnserver.csd.univie.ac.at/rcomwiki/doku.php?id=wiki:uninstal
>> ling_r
>> _manually
>>
>> Regards,
>> Jose
>>
>>
>>> From: rkevinburton at charter.net
>>> To: r-help at r-project.org
>>> Date: Thu, 10 Nov 2011 09:07:20 -0600
>>> Subject: Re: [R] Upgrade R?
>>>
>>> Since apparently there is no one familiar with this error message
>>> let me rephrase the question. Is there a 'manual' process to fully
>>> remove a
>> version
>>> of 'R' from my machine? This is a Window PC running Windows 7.
>>>
>>>
>>>
>>> Thank you.
>>>
>>>
>>>
>>> Kevin
>>>
>>>
>>>
>>> From: Kevin Burton [mailto:rkevinburton at charter.net]
>>> Sent: Monday, November 07, 2011 2:23 PM
>>> To: 'r-help at r-project.org'
>>> Subject: Upgrade R?
>>>
>>>
>>>
>>> I am trying to upgrade to R 2.14 from R 2.13.1 I have compied all
>>> the libraries from the 'library' directory in my existing
>>> installation
>> (2.13.1)
>>> to the installed R 2.14. Now I want to uninstall the old
>>> installation (R
>>> 2.13.1) and I get the error:
>>>
>>>
>>>
>>> Internal Error: Cannot find utCompiledCode record for this version
>>> of the uninstaller.
>>>
>>>
>>>
>>> Any ideas?
>>>
>>>
>>>
>>> Kevin
>>>
>>>
>>> [[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.
>>
>>
>>         [[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.
>>
>> ______________________________________________
>> 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.
>>
>
> 	[[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.
>
> ______________________________________________
> 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.



More information about the R-help mailing list