RAqua

The open source statistical computing package R is a GNU project to develop a package similar to Bell Laboratories’ S statistical package. R runs on a variety of platforms, including most X11-based systems and Windows. Although an X11-based version of R can be installed with Fink, another port of R that supports both X11 and Mac OS X, RAqua, has been developed by Stefano M. Iacus and others associated with the R-Core/R-Foundation. A binary distribution of RAqua is distributed through the Comprehensive R Network (CRAN; http://cran.r-project.org/).

The installer places an application named StartR in your Applications folder. Double-clicking the StartR icon opens an Aqua-based console window, which is divided into lower and upper subwindows. You can enter R commands in the lower subwindow, while the upper subwindow shows your command history, as shown in Figure 7-14.

RAqua’s console

Figure 7-14. RAqua’s console

Figure 7-15 shows an RAqua graphics window containing a histogram.

RAqua’s graphics window

Figure 7-15. RAqua’s graphics window

RAqua is AppleScriptable. Example 7-1 shows an AppleScript that instructs RAqua to store some values in a variable x, and display a histogram corresponding to these values.

You can use X11 graphics with R from the Aqua R console or from a Terminal (or xterm) window. In either case you must ...

Get Mac OS X Panther for Unix Geeks, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.