[R-SIG-Mac] upgradeable R layout

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Nov 14 09:20:24 CET 2008


On Thu, 13 Nov 2008, Alexy Khrabrov wrote:

> Steven -- thanks a lot!  Now it's clearer what to do with the 64 bits, but 
> still it doesn't answer the question of upgradeability -- meaning, you went 
> ahead and installed a bunch of packages, then a new version of R comes along, 
> and what do you do?
>
> One way I can see handling it it with a local install, outside of the 
> framework, and reinstalling with the command from the previous list -- and 
> you still have to do that.  Going over a list of 60+ packages in the 
> installer is not really fun...

See the rw-FAQ Q2.8.  If you use a separate library tree for non-core 
packages (highly recommended), then all you have to do when you update R 
is to run update.packages(checkBuilt=TRUE, ask=FALSE) .  Simple!
(If you have a personal library, that is versioned so you need to do

cp -r ~/Library/R/2.7/library ~/Library/R/2.8/library

first, or move it if you are wiping out 2.7.x.)


Steven is giving 2.8.0 credit for a much earlier concept, 
sub-architectures.  The difference in 2.8.0 is that 64-bit 
sub-architectures were added to i386 and ppc in the CRAN distribution. 
He also has an unfortunate tendency to write '64-bit' when he means 
'ppc64' and not 'x86_64'.  I've been thrown several times when the issue 
was specific to ppc64.

>
> Cheers,
> Alexy
>
> On Nov 13, 2008, at 9:03 PM, Steven McKinney wrote:
>
>> 
>> 
>> One last bit - I set up a shell script in
>> /usr/bin
>> 
>> called R64
>> 
>> containing
>> 
>> #!/bin/sh
>> R --arch=ppc64
>> 
>> to allow easy command line startup of
>> 64 bit R and to allow ESS to find
>> and start up 64 bit R sessions in Emacs.
>> 
>> 
>>> -----Original Message-----
>>> From: r-sig-mac-bounces at stat.math.ethz.ch [mailto:r-sig-mac-
>>> bounces at stat.math.ethz.ch] On Behalf Of Steven McKinney
>>> Sent: Thursday, November 13, 2008 5:49 PM
>>> To: Alexy Khrabrov; r-sig-mac at stat.math.ethz.ch
>>> Subject: Re: [R-SIG-Mac] upgradeable R layout
>>> 
>>> Greetings Alexy,
>>> 
>>> 
>>>> -----Original Message-----
>>>> From: r-sig-mac-bounces at stat.math.ethz.ch [mailto:r-sig-mac-
>>>> bounces at stat.math.ethz.ch] On Behalf Of Alexy Khrabrov
>>>> Sent: Thursday, November 13, 2008 4:29 PM
>>>> To: r-sig-mac at stat.math.ethz.ch
>>>> Subject: [R-SIG-Mac] upgradeable R layout
>>>> 
>>>> Greetings -- I'd like to keep my R on Mac in an upgradeable way. I
>>>> noticed that currently all packages I installed from R.app are in
>> the
>>>> R.framework -- are they going to be clobbered when I replace R 2.7.2
>>>> by 2.8.0?
>>> 
>>> There are quite a few changes between R 2.7.2 and R 2.8.0
>>> 
>>> I abandoned my R 2.7.2 and have no regrets so far (but you
>>> don't have to - you can have different versions and Simon Urbanek
>>> provides a small RSwitch gui app that lets you switch back and forth).
>>> 
>>>> 
>>>> At the same time with the upgrade, I'd also like to switch to 64
>> bit.
>>>> One good page I found about it is
>>>> 
>>>> http://www.matthewckeller.com/html/64_bit_r_on_mac.html
>>>> 
>>>> It suggests that packages are installed into a separate directory by
>>>> doing it from command line install.packages with a lib= parameter.
>>> 
>>> This website is out of date because of the changes
>>> in place for R 2.8.0
>>> 
>>> For R 2.8.0 if you look into one of a package's library
>>> directories, e.g.
>>> 
>> /MacintoshHD/Library/Frameworks/R.framework/Versions/2.8/Resources/libra
>>> ry/Matrix
>>> 
>>> you will see a subdirectory
>>> /libs
>>> which will contain further subdirectories (once you've installed for
>> the
>>> arch involved), e.g.
>>> /ppc
>>> /pp64
>>> which hold the architecture-specific files.  So you don't have to keep
>> a
>>> 64 bit version somewhere separate from your 32 bit version.  Nice.
>>> 
>>> I installed R from Simon Urbanek's website - always up to date -
>>> http://r.research.att.com/
>>> using the method
>>> 
>>> Leopard builds can be installed as follows - paste in Terminal (for R
>>> 2.8.x):
>>> curl -s
>> http://r.research.att.com/R-2.8-branch-leopard-universal.tar.gz
>>> | sudo tar fvxz - -C /
>>> 
>>> after setting up the various compilers and other software discussed
>>> in the "Tools for R Development" and "Other binaries and tools"
>>> sections.
>>> 
>>> Now you have R installed and it has all architectures ready.
>>> (I've wrestled through 64 bit configure / make / install for
>>> prior R versions, this is much better!  Thank you Simon Urbanek
>>> and others!)
>>> 
>>> I then installed the 32 bit R-Gui and renamed it to R32.app.
>>> I installed the 64 bit R-Gui and renamed it to R64.app,
>>> so I can fire up either 32 bit or 64 bit (or both!) and
>>> use the excellent package manager and package installer.
>>> The package installer installs the package using the
>>> architecture of the R-Gui it is invoked from, so architecture
>>> is handled automagically.
>>> 
>>>> 
>>>> Now I'd like to install everything into a lib anyways, but
>> preferably
>>>> without having to specify lib= all the time -- is there a way to
>> make
>>>> my local location the default for install.packages?
>>> 
>>> With the R-Gui apps in place, you can install packages easily, they
>>> are installed in their standard place and I've had no problems with
>>> this.
>>> 
>>>> 
>>>> Also -- can the R.app be tweaked to do all this, if I want to use it
>>>> with the 64 bit and local install for packages?
>>> 
>>> Yes - one way is described above.
>>> 
>>>> 
>>>> The idea is to make upgrading R smooth -- ideally, it would do
>>>> update.packages(checkBuilt =
>>>> TRUE) by itself as a part of the upgrade.
>>> 
>>> The only hiccup I encountered was a TCL/TK issue (now resolved)
>>> but otherwise getting 32 bit and 64 bit R up and running
>>> has been very smooth.  (Now the issue is that ppc64 is going
>>> extinct in the not too distant future - time to put in a
>>> request for an Intel Mac!)
>>> 
>>>> 
>>>> Are there other ways to simplify R upgrade on Mac and/or am I
>> missing
>>>> something?
>>> 
>>> Once you get set up as I have, you won't be missing anything!
>>> 
>>> Good luck
>>> 
>>>> 
>>>> Cheers,
>>>> Alexy
>>>> 
>>>> _______________________________________________
>>>> R-SIG-Mac mailing list
>>>> R-SIG-Mac at stat.math.ethz.ch
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>> 
>>> 
>>> Steven McKinney
>>> 
>>> Statistician
>>> Molecular Oncology and Breast Cancer Program
>>> British Columbia Cancer Research Centre
>>> 
>>> email: smckinney at bccrc.ca
>>> tel: 604-675-8000 x7561
>>> 
>>> BCCRC
>>> Molecular Oncology
>>> 675 West 10th Ave, Floor 4
>>> Vancouver B.C.
>>> V5Z 1L3
>>> 
>>> Canada
>>> 
>>> _______________________________________________
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac at stat.math.ethz.ch
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

-- 
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



More information about the R-SIG-Mac mailing list