Benchmarks Online

Skip Navigation Links


Page One

Campus Computing News

The Academic Computing Services
High-Performance Computing Initiative

The UNT General Access Computer Labs: What we did this summer - 2006

Fall 2006 - Computer-Based Training Update

EDUCAUSE Coming in October

Everything You Need to Know About Computing Resources at the University of North Texas

Today's Cartoon

RSS Matters

The Network Connection

Link of the Month

WWW@UNT.EDU

Short Courses

IRC News

Staff Activities

Subscribe to Benchmarks Online
    

 Research and Statistical Support - University of North Texas

RSS Matters

Tinn-R:  A Convenient Script Editor for R on the Win32 Platform

Link to the last RSS article here: RSS FAQ  - Ed.

By Dr Rich Herrington, ACS Research and Statistical Support Services Consultant

The S language was designed to translate statistical ideas into software implementations quickly and faithfully.  In recognition of the success of this endeavor, the Association for Computing Machinery (ACM) presented their prestigious Software System Award to John Chambers, the principal developer of the S language. The implementation of S that we will concern ourselves with here is the GNU version of S - R.  R is a cross-platform statistical programming environment that is  increasingly evolving into a system that is closely integrated with the underlying operating system environments on which R is maintained.  On Unix and Linux platforms, many IDE applications are available to choose from (IDE - integrated development environment or source code editor).  Text based editors can be used for editing the R scripts:   Emacs is one such editor;  Vi is another popular editor for UNIX based systems.  However,  an IDE provides further enhancements such as color coding of syntax;  a pager or execution shell that allows concurrent compiling and debugging of source code;  the ability to paste in code templates for the different language constructs (e.g. loops; case-statements, etc); to name a few.  Here, we discuss Tinn-R, a Win32 based GNU project (see SourceForge project page) that serves some of the purposes of an IDE for the R console on the Windows platform.

The R Script Editor

R comes with a built in script editor (from the R console go to the File-New Script menu entry).  Invoking the script editor produces the following:

File-New Script menu entry

To use this editor, a script is typed into the R Editor (or a script file is loaded).  Then a user selects the R script  in the R editor window (i.e. mouse select and drag operation of the relevant R script).  Finally,  a  right mouse click and selection of "Run line or selection" produces output in the R console window.  For example, the red and blue output in the R console is produced below:

right mouse click and selection of "Run line or selection"

The R editor that is integrated into the R Windows installation is a fairly basic and feature-less editor - a far cry from an IDE.  However, the  Tinn-R editor is an indispensable helper tool for users of R on the Windows platform.

Tinn-R

The Tinn is an editor under development under Borland - Delphi 5.   Tinn-R is licensed under GPL (GNU Public License) and can be downloaded from the SourceForge project Page.  Tinn-R contains enhancements to allow syntax highlighting of S language.  Additionally, Tinn-R interacts with the R console and submits code in part or in whole to R directly:

Tinn-R interacts with the R console and submits code in part or in whole to R directly.

For example,  the following produces output in the R console:

Producing output in the R console.

Output in the R console

Some of the general features of Tinn-R are: syntax highlighting for R code as well as many as 20 other languages;  bracket matching;  project management (with multiple files);  copy code with syntax coloring in RTF, HTML or TeX;  and Tinn-R can act as a TeX compile shell.  A major  advantage of using Tinn-R is that if R crashes (which does happen rarely),  one doesn't lose all of the R code that has been written but not yet saved to file. Another advantage is that one can return to Tinn-R and continue writing R code while is performing computations.  A nice tutorial on downloading, installing R and Tinn-R can be found at:  http://mcs.une.edu.au/~Rguide/Rnotes.pdf (a local copy is housed here at RSS).

 


Special Announcements
:  RSS will be maintaining a blog devoted to research and statistics related  news - RSS-Blogs;  Additionally, RSS will be maintaining a Zope/Plone website devoted organizing communities and resources involved in survey research - RSS-Surveys

 

 


Please note that information published in Benchmarks Online is likely to degrade over time, especially links to various Websites. To make sure you have the most current information on a specific topic, it may be best to search the UNT Website - http://www.unt.edu . You can also search Benchmarks Online - http://www.unt.edu/benchmarks/archives/back.htm as well as consult the UNT Helpdesk - http://www.unt.edu/helpdesk/ Questions and comments should be directed to
benchmarks@unt.edu

Return to top