Why a GUI for R isn’t always a bad idea

The arguably best way to work with R is through the command line. Some even argue that the use of a graphical user interface (GUI) should be completely discouraged. And that is where I disagree. The command line can be quit intimidating for the new or occasional users, who may therefore benefit from a GUI. There are a number of different GUI available, for example R commander, JGR, Deducer (which includes a very nice plot builder), RKward, Rattle (geared towards data mining) and BiodiversityR (focuses on biodiversity analysis). None of them offer the same sophisticated graphical interface as e.g., S plus or SPSS, but they are in general easy to use and quit suitable for the more common type of analyzes. What they have in common is that while providing you with an graphical interface, they also show you the commands generated via the point and click dialogs. This helps in getting to know the R syntax and thus simplifies the learning curve of R.

A GUI might even by helpful for the more advanced user who quickly want to do some analyses but can’t remember the commands. And what about opening / importing a data file? Of course this can be done from the command line, but sometimes it is just easier to find and import the file in one go using a graphical interface.

For those who like to use R to analyze spatial data, there is ManageR. It is a plugin for Quantum GIS (QGIS ) offering an interface to R. It is actually more a command line interface (CLI) , but with some very basic functions accessible through a menu, such as summary and descriptive statistics,  correlation matrix,  linnear regression and the most common graphics (inc. scatter plots, histogram, box-plots, pie diagram, bar graph and density plot). There is furthermore a menu to create polygon centroids and voronoi polygons. What like about the plugin is that it makes it very easy to get (vector) data from QGIS in R and vice versa, thus allowing quick analyses of spatial data.

In summary, while I would agree that the best way to work with R is through the command line, there are also users who may benefit from a graphical interface or just like it better. R and the community offer a variety of options to choose from. Some are specifically tailored to the beginning users (e.g., PMG, Rcmdr) while others are for specific uses (e.g., BiodiversityR and Rattle) . For an overview of available R GUI, see the R GUI project page). Just check it out and see which suits best your needs.

Edit September 17 2010: Through this R function reference tool (see this post for more details) I discovered two programs that come with a very different visual programming interface for R. Processes of data analysis are described as a flowchart by the user and then run. After drawing the flowchart the user can run the different functions described in the flowchart. Check out Red-R and Ranalyticflow.

Tuesday, March 01 2011: Check out the new kid on the block, the multi-platform RStudio. Rstudio is a “new integrated development environment (IDE) for R. RStudio combines an intuitive user interface with powerful coding tools to help you get the most out of R”.

About these ads

3 thoughts on “Why a GUI for R isn’t always a bad idea

  1. Thomas Hopper

    Well spoken; R GUIs can be beneficial. In fact, as Bruce Tognazzini and others have repeatedly demonstrated, well-designed GUIs benefit everyone, and greatly aid the exploration that accompanies learning.

    Reply
  2. joseph lam

    just some ideas:

    1. R gui should not copy the logic from SPSS, etc. otherwise, the GUI-ed R will be just a downgraded version of SPSS or etc.

    2. The gui should strengthen the weakness of R. Obviously, only a fool would spend time to programe GUI for plotting functions of R! So, i don’t think it is necessary to create GUI for R on data analysis – the logic of data analysis is much much better than that of SPSS, why put constraint on R from SPSS!?

    3. However, I have to save data management (recoding, create new var, …) of R is awful!!! So, save energy and just develop GUI for data management of R. That is!

    Reply
    1. pvanb Post author

      I don’t think GUI’s should be based on or follow the same logic as SPSS. Most if not all existing GUIs provide a set of commonly used functions. But, at the same time they give the user the underlying code. It does therefore not (need to) put constraints on R, but rather helps the user to build some experience in coding in R.

      Whether the focus of a GUI should be on (better) data management, plotting functions or data analysis is I think a matter of preference. I for example am happy enough with how data can be handled in R (made easier in e.g., Rstudio or Rcommander).

      On the other hand, I wouldn’t mind a good GUI that allows me to quickly make a wide variety of plots using point and click for quick data exploration (I am actually not sure I am correctly interpreting your statement about how you would consider programming a GUI for plotting functions of R foolish).

      Anyway, now that I am on the subject, there are of course quite a few packages that do provide a GUI for creating plots, including Rcommander, Rattle (if I remember correctly, is has been a while I tried it out), Rkward, rgobi, and iplots in Java GUI for R. But there is certainly room for improvement there, perhaps provided by some of the packages I haven’t tried out yet, such as the plot builder in Deducer, GrapheR, playwith of the package plotAndPlayGTK, or this webbased interface for ggplot2.

      Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s