IDE/Script Editors
Except for the MacOS and Windows versions of R frontends, no internal script editor is provided. The command 'options(editor
= ...)' allows defining its own preferred external one. Several editors have been customized to enhance their functions regarding the edition of R scripts: S language syntax highlighting, execution of code directly from the editor, macro and templates,... Here are some external editors with nice features for editing R scripts.
- Uwe Ligges proposes a R package for syntax highlighting and submitting code to R from the WinEdt text editor under Windows. You can also get that RWinEdt package here.
- Tinn-R is another text editor under Windows. It is particularly well integrated with Rgui and SciViews-R thanks to additions made by José Cláudio Faria. These include R syntax highlighting, help on R functions syntax while you type them, direct submission of R code and many other tools to control R from within the editor.
- Textpad can also be used. It provides an S-PLUS syntax highlighting file that can be used also for R code. Here is my own syntax highlighting file for R, and also templates for speeding up writing of R code, a R documentation syntax highlighting and template to ease edition of R help files. Finally, this little program (version 1.0.2) allows to source in RGui the file you are currently editing in Textpad, or to submit only the current selection.
- Crimson editor also proposes a syntax highlighting file for R language (section "Syntax files"). Cai Yong explains here how to use TpR.exe to submit code from Crimson Editor to Rgui (see also this screenshot)
- syn is a free (GPL) and feature-rich code editor with many syntax highlighting definitions, including for R. More interaction with R, including starting a R console directly within Syn is possible by the configuration of custom tools.
- Kate is a common text editor under Linux. A syntax highlighting file is available here. This is the result of a collaboration between Arne Henningsen, Ben Goodrich, and Thomas Friedrichsmeier. Kate has also an embedded console, and you can start R from there to get a lightweight integrated solution to develop, edit and test your R code.
- Nedit is a simple, yet powerful text/code editor. Ernesto Jardim provides a
R syntax highlighting file for Nedit.
- jEdit is a complete code editor written in Java and it is multiplateform-compatible. Zed A. Shaw has written a R/S syntax highlighting file for jEdit, Tobias Elze and Jose Claudio Faria proposed modified/updated versions (all available at http://community.jedit.org).
- Ultra Edit is another text editor (shareware, for Windows only) with a syntax highlighting definition for R.
- The famous Vim editor now also provides syntax highlighting for R. Johannes Ranke contributed a Vim script to paste R code from a Vim session to R. You can get it from here
- For Linux, BSD, MacOS X,... users there is also another open source alternative to edit your R code with syntax highlighting: the bluefish editor.
- SubEthaEdit is a non-X11 alternative to eMacs or bluefish for OS X user. A R syntax highlighting file is available.
- Alpha is a very powerful code editor with various "modes", including for the S language. It exists in different versions and one (AlphaTk) runs on Mac OS, Windows and Linux.
- Eclipse is a complete and versatile IDE written in Java (and thus, platform-independent). Stephan Wahlbrink provides a plugin to edit R code in this environment.
- There is also a R syntax highlighting definition file for BBEdit and TextWrangler provided by Gene. The file is available here. You have to place it in "~/Library/Application Support/BBEdit/Language Modules/" for BBEdit and in "~/Library/Application Support/TextWrangler/Language Modules/" for TextWrangler, or in the corresponding global Library locations.
- gedit, the "standard" Gnome text editor also has a syntax highlighting feature for R code.
Last update: 25 December 2007, by Philippe Grosjean.