[R-SIG-Mac]R plus Python

Jan de Leeuw deleeuw@stat.ucla.edu
Fri, 28 Feb 2003 11:39:06 -0800

Later today the file python_plus_R.tar.gz will appear on

It contains R-1.6.2 (patched) with binaries for 200-300
packages. It also includes the fink dynamic libs needed
for running R.bin (these are installed in /sw/lib).

Second, it contains a Python framework build,
that comes with PyObjc, PyOpenGL,
Numeric, numarray, PyPostgres, PYRO, PythonCardPrototype,
wxPython, and, most importantly, Rpy. Thus you can
program in Cocoa, OpenGL, wxWindows, and R from this

Third, it has the Tcl and Tk native framework builds (used both
in tkinter and R).

In /Applications it installs a MacPython-2.3 and a wxPythonOSX-
folder, which contain various front ends. For instance, there is
IDLE (useful for tkinter programming) and PyShell (useful for wxWindows

In /usr/local/bin you find the python, pythonw, pyshell, pycrust,  
and resourceEditor scripts (the first two are from the Python distro,
the next two from wxPython, the last two from PythonCard). Of course
you can still run R from the command line (Terminal.app) if you want

If you open IDLE, or PyCrust, or PythonIDE, you can say

 >>>import * from rpy

and things should roll along. No X11 server required !

In IDLE you can even say, in addition to the stuff above,


Still no X11 required.

If you start python from the command line (using the
pythonw script), you can give the same sequence of
commands, but then you will use the X11 graphics
device (and the X11 version of tk). Plenty of choices.

Of course the nice thing is that you can combine R programming
with Cocoa programming or wxWindows programming, and you can
write python scripts that use python versions of R, numarray,
and OpenGL commands.

You can even run


from the Python GUI's.
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
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://gifi.stat.ucla.edu
           No matter where you go, there you are. --- Buckaroo Banzai