[R-SIG-Mac]Running R on your Mac

Jan de Leeuw deleeuw@stat.ucla.edu
Sun, 3 Mar 2002 13:12:37 -0800


Options:

1. Run the Carbon version of R (available from CRAN). You don't need
anyhting else. You don't even need OS X. This version of R is relatively
slow, compared to the Darwin based versions, and it misses various
components (tcl/tk, internet upgrading and installing, ATLAS). It does
have its own menus, of course.

2. Run the Darwin version of R in a Terminal window. If you want graphics
you can use the devices such as pdf, postscript, xfig which write to a
file. If you want graphics output to the screen, run your X11 server in
rootless mode and run the X11() command in R. This will open an X11
graphics device on your Aqua desktop. If you use the XTools or XOroborus
window manager,  then your X11 windows will look like the rest of your 
Aqua
desktop.

3. Run the Darwin version of R in an Xterm (or Eterm, or whatever
X11 terminal emulator you use). This can be done both in rootless
and full screen mode. It sets the graphics device to X11()
automatically. In this option you can use the various window
managers to make your desktop look like a GNOME or
Next desktop, if you are so inclined.

4. Run the GNOME version of R. This can be done by saying "R --gui=GNOME"
in an Xterm window, or in the Terminal window if there already is an
X server running. This gives R its own window, with various menus. Of
course you can run this on the Aqua desktop on in full-screen X11 mode.
The GNOME version is "experimental", and some of the menus do not
work. The fink version of R does not have GNOME support. You can
run the GNOME version of R in full-screen mode using the complete
GNOME or nautilus desktop (both are in Fink).

5. Run XEmacs, with ESS installed. You can get the latest version of
XEmacs from Fink (same for X11 versions of GNU Emacs). This will run
R in an Emacs window. It gives you all the usual Emacs menus and
commands, plus some extra menus specifically for R. You can split
the window and run R in one buffer and edit R in another buffer (and
you can evaluate pieces of R code in the second buffer conveniently).
The device is automatically set to X11, and again you can use rootless
and full-screen.

6. Run the Carbon version of GNU Emacs (also in Fink) with ESS
installed. This runs on the Aqua desktop, so you need to run your
X server in rootless mode, and you need to tell R (running in the
Emacs window) that X11(display="localhost:0.0"). This will open an
X11 graphics device.

7. For insane people: if you have Virtual PC running, you can also
run the Windows version of R. If you have an X11 server running within
Virtual PC, you can duplicate most of the options above. If you
have a Macintosh emulator running in your X11 server, you can have
real fun.

For most of my work I use option 2 or option 6. It is also clear what
is missing most painfully: a Quartz graphics device for the Aqua 
desktop. This
would allow you to use options 2 and 6 without having to use X11 at
all. As far as I know, you cannot run the Quickdraw (macintosh()) device
from the Darwin version (that would already be quite nice).
===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw@stat.ucla.edu
homepage: http://www.stat.ucla.edu/~deleeuw
========================================================
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://www.stat.ucla.edu/~deleeuw/sounds/nomatter.au
========================================================