Later today the file python_plus_R.tar.gz will appear on http://gifi.stat.ucla.edu/pub. 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 python. 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-2.4.0.2 folder, which contain various front ends. For instance, there is IDLE (useful for tkinter programming) and PyShell (useful for wxWindows programming). In /usr/local/bin you find the python, pythonw, pyshell, pycrust, codeEditor, 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 to. If you open IDLE, or PyCrust, or PythonIDE, you can say >>>import * from rpy >>>r.quartz() >>>r.demo("graphics") and things should roll along. No X11 server required ! In IDLE you can even say, in addition to the stuff above, >>>r.library("tcltk") >>>r.demo("tkcanvas") 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 >>>r.update_packages() from the Python GUI's. === Jan de Leeuw; Professor and Chair, UCLA Department of Statistics; Editor: Journal of Multivariate Analysis, Journal of Statistical Software 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 http://gifi.stat.ucla.edu/sounds/nomatter.au ------------------------------------------------------------------------ -------------------------
R plus Python
1 message · Jan de Leeuw