[R-SIG-Mac] upgradeable R layout

Steven McKinney smckinney at bccrc.ca
Fri Nov 14 02:48:47 CET 2008


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



More information about the R-SIG-Mac mailing list