[R-SIG-Mac] R with Aqua Tcl/Tk

Jan de Leeuw deleeuw at stat.ucla.edu
Thu Jun 23 23:42:58 CEST 2005


If you compile R on Tiger with

configure --with-aqua --with-blas='-framework vecLib' --with-lapack

it uses the included Aqua Tcl/Tk. This has some good consequences
and some bad ones.

1. If you load tcltk.so at the beginning of your session you will see  
that R
opens a window in the dock and a bunch of menus. If you look a bit  
closer
you will find R thinks it is a (Carbon) Tcl/Tk application.

2. Because it thinks (mistakingly) that it is an application, it will  
allow
you to start quartz() and interact with the graphics windows, even if
you start R from the terminal or from Emacs/ESS. This is the good
thing. demo(tkdensity) shows only Aqua windows.

3. The menus, however, are useless, because R is not really a Tcl/Tk
application, and in particular you cannot copy or save the quartz
graphics (you have to use pdf or command-shift 3 or 4). The "source"
menu. moreover,  expects you to run tcl scripts.

4. You cannot use the Aqua GUI, because R gets very confused about the
various event loops that are going on.

5. You cannot really use X11, although I think that if you start an
X11 device before loading tcltk and before starting quartz you can
switch devices and not get into trouble. But trying to open an X11
device after loading tcltk and starting quartz produces a bomb
(well, the modern equivalent of a bomb).

So the good thing is quartz graphics from Terminal.app and Emacs.app,
being able to interact with quartz graphics windows (foreground and
background). No X11 ugliness. The bad things are no GUI, no
saving of graphics  windows, and doing something non-standard
and rather shaky.

===
Jan de Leeuw; Distinguished Professor and Chair, UCLA Department of  
Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
Software
US mail: 8130 Math Sciences Bldg, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw at stat.ucla.edu
.mac: jdeleeuw ++++++  aim: deleeuwjan ++++++ skype: j_deleeuw
homepages: http://gifi.stat.ucla.edu ++++++ http://www.cuddyvalley.org
   
------------------------------------------------------------------------ 
-------------------------
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://gifi.stat.ucla.edu/sounds/nomatter.au



More information about the R-SIG-Mac mailing list