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 besides Emacs/ESS.
- Komodo Edit is a powerful code editor for all kinds of source files and it runs an Linux, Windows and Mac OS X. There is a plugin to transform it into a complete solution to edit R code (syntax highlighting, code completion, intelligent folding, abbreviation expansion). There is also a graphical test unit system, an interactive object explorer and a complete R reference toolbox "not unlike R Commander". The plugin can be downloaded from here, or the latest development version and installation instructions are on the SciViews-K web page.
- Eclipse is a complete and versatile IDE written in Java (and thus, platform-independent). There is a plugin to edit R code in this environment.
- jEdit is a complete code editor written in Java. There are several versions of R syntax highlighter (available at http://community.jedit.org). Also follow the development of orchestra which is an ambitious addition for integrating R in jEdit.
- JGR is more an R console replacement, but it provides also a very decent R code editor with syntax highlighting, calltips, completion and submission of code to R.
- RStudio is a new integrated development environment (IDE) for R that runs on Linux, Windows and Mac OS X.
- The famous Vim editor now also provides syntax highlighting for R. You can get a plugin to integrate R here. For Windows, there is another plugin using R-DCOM here. There is an alternate, multiplatform, plugin here.
Also look at the VIM web site, because there are other interesting resources there for R users (see here for an overview). There is also an R package to better integrate debugging facilites in Vim: adtdbg
- 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.
- For Linux, BSD, MacOS X,... users (NOT Windows) there is also another open source alternative to edit your R code with syntax highlighting: the bluefish editor.
Linux only (and Unixes)
- gedit, the "standard" Gnome text editor also has a syntax highlighting feature for R code. Moreover, an ambitious project named Rgedit provides a gedit plugin to run several R consoles in gedit and submit code (lines or blocks) to them. See the Rgedit home page for more info.
- Kate is a common text editor under Linux. A syntax highlighting file is available here. 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 X window text/code editor. There is also a R syntax highlighting file for Nedit.
- Although not primarily a code editor, Rkward has interesting features too to edit R script files and submit code to R.
Mac OS X only
Last update: 23 January 2012, by Philippe Grosjean.
- TextMate is another powerful Mac text editor. It supports R synthax highlighting, help section, submission of code to R and much more...
- There is also an R syntax highlighting definition file for BBEdit and TextWrangler. 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.
- SubEthaEdit is a collaborative text editor. A R syntax highlighting file is available.
- Fraise is another Mac-specific text editor with syntax highlighting for R.