A couple of days ago, there was an interesting discussion on the REvolution Computing blog, where David discusses installing and using ESS as a front-end for R. His discussion of ESS got me to thinking about R's default user interface on Linux (and other operating systems) and how accessible they made R to new users. While the default R interface on Windows and OS X are light years from offering the kind of accessibility and ease-of-use offered by SPSS or other graphical tools, they do make it easier for new users to know where to start on their journey into the land of single-letter Googling.
On Windows and OS X, the default interface for R is a Graphical User Interface (GUI). The screen-shots I have seen of the R interface on OS X look very nice. (Please note that this screen shot is very dated, v 2.6.2, and may not represent the current tool very well)
I have used the Windows interface and while it is not as sophisticated as the interface provided by OS X, it is adequate. (This screen shot is of more current vintage, which really just highlights the gap in the two tools.)
In contrast to both, the default Linux interface is straight-up command-line heaven (or hell, depending on your point of view). I rather like the spartan, CLI interface provided by R, but many others do not. The most important reason I think the current default option is a problem is that many new users have a hard time locating R in the menu, because it's not there. Imagine a new users' surprise. After downloading and installing R, which is a fairly hefty download, the user is unable to find an icon or link to start the program.
This isn't exactly newbie-friendly. In fact, I will admit that I spend several minutes looking for a menu entry before figuring out that there wasn't one. And I figured this out by looking at the contents of the core package and realizing that there was no R.desktop file installed but there was a program called R in /usr/bin.
David's post on the REvolution Computing blog discusses ESS as a front-end for R. I have used ESS in the past and it is a very good way to interact with R. Unfortunately, I had some problems with ESS and EMACS in general which eventually led me to abandoning it, but for many experienced users this is an excellent choice. In fact, it is obvious that many of the users on the R-users mailing list use ESS exclusively or nearly exclusively.
Lately, I have been using the new Vim-R-plugin2 for . . . Vim. It is similar to ESS in many ways but uses screen to connect Vim to R. I have been using screen at work for other reasons and the integration between Vim, R, and screen makes my life much easier. As a nice added bonus for Ubuntu users, the plugin works just as well with byobu.
While editor extensions such as Vim-R-plugin2 and ESS are great options for experienced users, these tools do not provide an adequate interface for new users. There are many reasons for this.
- Learning curve -- Don't pretend there isn't a learning curve.
- Not installed by default when you install R.
- Neither tool provides a menu entry to start R.
Inevitably, someone will point out that while Python is installed by default on Ubuntu, IDLE is not and therefore Python does not have, by default, a menu entry in the menu. Hopefully everyone will read this far before writing a response in the comments. :-) To me the difference between Python and R is simple. The people looking for Python are going to have at least some technical skills, otherwise they will never hear about python and don't need to interact with it. In contrast, non-programmers do learn about R and want to try it out. In the past year, I have seen articles about R in the NY Times and other mainstream publications. While R is unlikely to ever achieve an installation base similar to FireFox, it is an increasingly popular tool. More importantly, many of the people expressing interest in it are not programmers or Linux users with lots of Command-Line-Fu.
What is needed is a sane front-end for new users that will help ease them into R. I am not saying that R needs an interface like SPSS or PSPP. I would be more than satisfied by something similar to what is provided for Windows or OS X users (perferably more like the OS X interface). At the very least a new user should be able to install R and find it/run it from their menu! Fortunately, there are several front-ends to R.
- tkStartGUI
- RCmdr
- Rkward
- JGR
- Cantor
- Rattle
- Kate/Gedit (The default text editors on K/Ubuntu)
- Others - There are several others.
Tools such as JGR or Rattle are not currently in the Ubuntu repositories, which makes using them as the default interface difficult to say the least. They can be installed via CRAN, but that's not the first thing that a new user is going to want to do.
Kate and Gedit include syntax highlighting for R and can embed a terminal in the editor but, new users will not find this easily and it does not address the need for a menu entry.
We have narrowed the list to tkStartGUI and RCMDR. tkStartGUI is actually installed by default, although it's rarely used. If you are already running R, it's easy to get it running, if you want to. Simply enter these two commands into an existing R session:
library(tcltk)
tkStartGUI()
This should start the simplest graphical interface you have ever seen. While it's not pretty (tcl/tk), it is functional AND odds are good that if you are reading this long-ass post, you already have it installed! You will quickly notice that this interface is actually less useful than the basic interface provided on Windows.
While Rcmdr is not installed by default, it is easy to install:
sudo apt-get install r-cran-rcmdr
On my machine, installation of Rcmdr required me to install 22 megabytes of additional R extensions. Most users can spare 22 megabytes, or more and this is a much smaller download/installation than RKward on a Ubuntu system. But, much like tkStartGUI, Rcmdr does not come with a .desktop file and can not be located from within the K/Ubuntu menu. Starting Rcmdr, from within R is easy:
library(Rcmdr)
Rcmdr()
This should present you with a nice easily used GUI for R. While it's not as nice as the OS X interface, it is an ugly (tcl/tk) but capable interface for R.
<<>>
It is possible to set up a default Ubuntu installation to include a menu entry for either tkStartGUI or Rcmdr. Given that tkStartGUI is already installed by default this seems like a good place to start. And, logically, Rcmdr should have a .desktop file when installed, although I don't think it should be installed by default, although setting it to recommended might be a good idea (it may be already, I have to look).
These two proposals would help new users find R and get started and bring a certain degree of parity to the different platforms served by R. As an added bonus, setting things up this way would have practically no affect on users who are already satisfied with the command-line approach. Most would never even notice the additional entry in their menus and it wouldn't hurt them if they did.
Comments?