Version 25 of R

Updated 2006-10-16 20:46:08

See also the alphabet.


"R [L1 ] is a language and environment for statistical computing and graphics" [L2 ]. For more background on R, see the July 2003 installment of "Server Clinic" [L3 ], as well as the later series here [L4 ] and here [L5 ].

R apparently binds to Tcl, Tk, and Visual Tcl in ways that have yet to be clearly described [L6 ]. Seductive screen-shots appear at http://www.bioconductor.org/Screenshots/index.html , for example. Brodgar is crucial.

Peter Dalgaard says in comp.lang.tcl that http://CRAN.R-project.org/doc/Rnews/ should be used as a source for more recent information; particularly in vol 1/3 and 2/3.

He goes on to say:

"What we currently have is a Tcl interpreter embedded in R and interface routines and (some) object reflection and communication mechanisms, which allow you to run Tcl stuff from within R.

What we don't have is the reverse: Mechanisms that let you control R from Tcl. Well, we do have some rudiments of it, but not as elaborate as in the other direction. In principle R is embeddable; you can build R as a shared object and link it into another program, but you probably need to jump through a few hoops to get event loops and such stuff right. (I believe http://developer.r-project.org/embedded.html is the best documentation we have.)"


That was the situation in early 2003. A few hours before the year ended, though, Neil McKay announced availability of Rtcl.


 What: R
 Where: http://www.r-project.org/
        http://cran.r-project.org/
        http://lib.stat.cmu.edu/R/
        http://www.gnu.org/software/r/R.html>
        http://www.ci.tuwien.ac.at/%7Ehornik/R/R-FAQ.html
        http://stat.auckland.ac.nz/rproj.html
 Description: Statistical computing and visualization language,
        similar to the S language.
        Provides a wide variety of techniques.
        Comes with a tcltk package, providing interface and language bindings
         for Tcl/Tk.
        Makes use of plplot.
        Note that Mark Myatt mailto:[email protected] is
         writing a syntax highlighting editor to be used as a front-end
         of R; contact him for details.
        Currently at version 1.5.0 .
 Updated: 01/2003
 Contact: See web site

See also Statistics.


AM (14 november 2005) I saw this article this morning:

Title: The R commander: A basic-statistics graphical user interface to R

Authors: Fox, J

Source: JOURNAL OF STATISTICAL SOFTWARE, 14 (9): - SEP 2005

Abstract: Unlike S-PLUS, R does not incorporate a statistical graphical user interface (GUI), but it does include tools for building GUIs. Based on the tcltk package (which furnishes an interface to the Tcl/Tk GUI toolkit), the Rcmdr package provides a basic-statistics graphical user interface to R called the "R Commander." The design objectives of the R Commander were as follows: to support, through an easy-to-use, extensible, cross-platform GUI, the statistical functionality required for a basic-statistics course (though its current functionality has grown to include support for linear and generalized-linear models, and other more advanced features); to make it relatively difficult to do unreasonable things; and to render visible the relationship between choices made in the GUI and the R commands that they generate. The R Commander uses a simple and familiar menu/dialog-box interface. Top-level menus include File, Edit, Data, Statistics, Graphs, Models, Distributions, Tools, and Help, with the complete menu tree given in the paper. Each dialog box includes a Help button, which leads to a relevant help page. Menu and dialog-box selections generate R commands, which are recorded in a script window and are echoed, along with output, to an output window. The script window also provides the ability to edit, enter, and re-execute commands. *Error* messages, warnings, and some other information appear in a separate messages window. Data sets in the R Commander are simply R data frames, and can be read from attached packages or imported from files. Although several data frames may reside in memory, only one is "active" at any given time. There may also be an active statistical model (e.g., an R 1m or g1m object). The purpose of this paper is to introduce and describe the use of the R Commander GUI; to describe the design and development of the R Commander; and to explain how the R Commander GUI can be extended. The second part of the paper (following a brief introduction) can serve as an introductory guide for students who will use the R Commander.

Link: http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/


GS (061016) Slides about a talk: The R-Tcl/Tk interface: Potential usage for graphical models, Peter Dalgaard [L7 ]


At the implementation level, R is a very interesting language with an approach which is very close to Tcl, yet implemented in a totally different way. In an expression such as "a = myfunc(1,b+2)" the arguments are passed in unevaluated form, sort of as a parse tree AFAIK. Inside myfunc, each argument is named, but the association is such that the first access to each argument will actually evaluate it (in the caller's context, of course). So in day-to-day use, the behavior of a function call in R is relatively normal.

The point is that it is possible to get at the incoming unevaluated form and that an argument can be force-evaluated more than once, with side effects and all. Therefore - like Tcl - R can use normal functions to implement control structures: "if(a<b,c=1,c=2)", since only the selected argument will be evaluated. Likewise for "while" and so on.

Like Tcl, R uses copy-on-write (COW) semantics, reference counts, and data sharing.

There is a book which describes S (the non-OSS precursor of R) called "Programming with Data", by John. M. Chambers. It lists S's delightfully concise goal: To turn ideas into software, quickly and faithfully.

-jcw


[ Category Language | Category Mathematics | Category Statistics | ]