If you're using R on a Linux or Unix system, there's not much available in terms of a graphical user interface in the standard R distribution: you're pretty much stuck with the command line. But as you get more adept at R, a good practice is to work from script files rather than directly at the command-line, and cutting-and-pasting from text files into R is a pain.
That's where ESS (Emacs Speaks Statistics) comes in: it's an extension to the popular GNU Emacs editor/lifestyle-choice that makes it easier to work with R source code and interact with the R interpreter. (Disclaimer: I wrote much of the ESS code several years ago for S-PLUS; it's since been extended to work with R and several other stats packages.) Emacs itself has a fairly steep learning curve, but if you know Emacs (or are willing to learn it), you can increase your R productivity significantly by using ESS.
I have a confession to make: I haven't used ESS in several years. But for my talk to the Linux User Group in Davis the other day, it seemed appropriate to use it for my R demonstration. Installing REvolution R on Ubuntu was a piece of cake. But (remembering from the times when I was developing it) I expected ESS to be a bit trickier to install. So I set aside a good hour to get ESS and Emacs working on Ubuntu.
I was pleasantly shocked: it took me less than 5 minutes. All I had to do was:
sudo apt-get install ess
and it was done. (Note: there's a typo where I describe this command in my slides.) Emacs was installed automatically, as a dependency. ESS just worked, no messing with the .emacs configuration file required. All I had to do was wait for the install to complete, start Emacs, and then issue the command to start ESS: ESC x R. Simple. (My kudos and gratitude goes to Dirk Eddelbuettel, who created and maintains the ess installation package for Debian and Ubuntu.)
Another resource I found useful was this ESS reference card -- it was a handy reminder for me of all the command in ESS for working with script files, getting help for R commands, and so on. If you're using Ubuntu, I recommend you give it a try.
Aside ess, which is great, you can also install emacs-snapshot-gtk and you will have a GTK interface for emacs, with better font shapes and aliasing. It's only eye-candy, but I think it makes more confortable to use emacs and R.
Posted by: Fernando Mayer | November 18, 2009 at 10:32
There is a nice Eclipse plug-in which supports R. Unfortunately, its homepage [1] is not updated to often
[1] http://www.walware.de/goto/statet
Posted by: andreas | November 18, 2009 at 10:34
Hey Fernando, just want to say thanks for creating ESS! That's my main mode of using R and I love it.
Posted by: Hrishi Mittal | November 18, 2009 at 10:35
There's also an handy R plugin for gedit
http://sourceforge.net/projects/rgedit/
Posted by: nico | November 18, 2009 at 11:16
David: I stopped using ESS several years ago as well. This was in due in part to my conversion from Linux to Mac OS X. What is your primary mode of using R now? I’m currently using TextMate and the R.tmbundle
Posted by: vince | November 18, 2009 at 11:30
I remember way back when you wanted emacs as your login shell on our Sun servers!
Posted by: Barry | November 18, 2009 at 11:33
Thus the obligatory comment... what about vim? http://www.vim.org/scripts/script.php?script_id=1048
Posted by: Avram | November 18, 2009 at 11:34
Another option is to use Vim to interact with R.
http://www.vim.org/scripts/script.php?script_id=2628
Years ago there was an R plugin for Vim but it was pretty limited. Over the past year, there was renewed interest in improving this plugin and the current version is really a thing of beauty.
The current plugin allows users of GVim and Vim to send syntax to the R interpreter. I had some problems with EMACS/ESS freezing when working with larger files and I have not had this problem using the Vim setup.
If you like Vim, install this thing today. It can do 90% of what ESS can do.
Unfortunately, you can not apt-get it. Instead you will need to download it and unzip the package into your ~/.vim folder.
Posted by: Andy | November 18, 2009 at 11:58
Oops, I meant to thank David.
Posted by: Hrishi Mittal | November 18, 2009 at 13:48
There is also an excellent all-in-one binary for Windows, put together by Vincent Goulet:
http://vgoulet.act.ulaval.ca/en/ressources/emacs/
Nice for those of us who have to move between OS's.
Posted by: Jared | November 19, 2009 at 08:19
There is also RKWard, a very nice and clean UI for KDE on Linux. And it also works on Windows with KDE for Windows!
Posted by: Friedrich Schuster | November 19, 2009 at 21:44
I second using RKWard, it has become my favourite tool in Ubuntu, and the graphical interface is excellent!
Posted by: Melvin Jesus Noe Gonzalez | October 02, 2010 at 19:35