Tutorial: R for Eclipse
The purpose of this tutorial is to introduce R users to the StatET, Sweave, and Subclipse repository management plug-ins for the Eclipse Software Development Kit (SDK). StatET and Eclipse are an extensible, open-source platform for writing R code in an integrated development environment (IDE). For R users that are trained as programmers, Eclipse provides an IDE that should be familiar to those working in languages like Java or C/C++. For R users that are trained as statisticians, StatET and Eclipse are an effective way to transition from working in simple text editors to an IDE with version control. Eclipse is freely available and runs on Linux, OS X, and Windows operating systems, allowing for a common development environment across multiple software platforms. Additionally, Java and C/C++ plug-ins are available for Eclipse, making it easier to develop and manage projects that contain a mix of R and C or Java code.
StatET is similar to other commonly used R editors, like Emacs, WinEdt, and TINN-R, in that it provides syntax highlighting and the ability to run single lines or blocks of R code from R script files. StatET uses rJava to open an R console inside Eclipse where users can either execute code from the R source document or directly input code. StatET also allows writing and executing R code from Sweave (*.Rnw) documents, and supports writing R documentation files (*.Rd) and using Roxygen. Users can customize syntax coloring and build templates for R, Rnw, and Rd files.
Subclipse provides StatET users with support for Subversion and allows users to maintain projects with current and historical versions of source code files. While usage of version control is common among professional software developers, it is not standard practice for desktop users of statistical software packages like R and SAS. Additionally, complex R projects often have multiple people submitting code at different points in time. Subversion allows users to checkout the source code, track changes made by others, and merge their changes with versions in the Subversion repository.