[R-gui] Summary of past discussions on R-Help

Philippe Grosjean philippe.grosjean@ifremer.fr
Tue, 8 Oct 2002 09:23:11 +0200


R-SIG-GUI is created to offer the opportunity to discuss and coordinate R
GUI projects. It is complementary to the R GUI Projects web page
(http://www.r-project.org/GUI/).
Best,

Philippe Grosjean

...........]<(({°<...............<°}))><...............................
( ( ( ( (
 ) ) ) ) )      Philippe Grosjean
( ( ( ( (
 ) ) ) ) )      IFREMER Nantes - DEL/AO
( ( ( ( (       rue de l'Ile d'Yeu, BP 21105, 44311 Nantes Cedex 3
 ) ) ) ) )      tel: (33) 02.40.37.42.29, fax: (33) 02.40.37.42.41
( ( ( ( ( 
 ) ) ) ) )      SciViews project coordinator (http://www.sciviews.org)
( ( ( ( (       e-mail: phgrosjean@sciviews.org
 ) ) ) ) ) 
( ( ( ( (       "I'm 100% confident that p is between 0 and 1"
 ) ) ) ) )                                L. Gonick & W. Smith (1993)
.......................................................................



R GUI project - summary of past discussions in R-Help mailing list
==================================================================
08/10/2002, by Philippe Grosjean (phgrosjean@sciviews.org)


General ideas shared by several people
--------------------------------------

- Different interfaces are required for beginner / power-user / teaching (=> a flexible, tailorable interface is better than a rigid one)

- Current R interface, including Windows Rgui and the Mac interfaces are more dedicated for powerusers => other requirements for beginners / teaching


- There is sometimes a confusion of the concept of GUI and one particular implementation of GUI (Splus, Spreadsheet-like,...). There is a need to show that (1) there are several different user interfaces with various impact on the way the software is used (console, batch, notebook, menu/dialog,...). Make also a table of advantages / inconvenients and include it in the Rgui projects web page.


GUI for teaching:
-----------------
- Teachers seem to range in two categories: those advocating for CLI (presumably satisfied with the current R user interface) and the others that are asking for a GUI. It seems they address different students. But perhaps, this is also connected to their teaching habits?

For instance, on one hand:
- Rohan Sadler [rsadler@agric.uwa.edu.au] asking for a teaching interface: "This GUI would support initially the simple six (EDA, probabilities and quantiles of distributions, t-tests,one-way anova, chi-square, and simple linear regression), and have the potential to develop into the next level of
statistical analysis (glms, multivariate methods, time series and spatial - analytical problems common across our faculty)." 

- David Lucy [dlucy@maths.ed.ac.uk] says: "I think the problem is that most users of R tend to be in research, or have a requirement for flexability from a suitably heavyweight language." He wrote some tcl/tk interfaces for the current R version: http://www.maths.ed.ac.uk/~dlucy/software.html. He says that it is better to make specific packages...

... and on the other hand:
- Frank E Harrell Jr [fharrell@virginia.edu] considers it's not difficult to teach students to use a command line interface and: "A better approach would be to implement the most often needed analyses on a Web server using R and Perl etc.  See http://hesweb1.med.virginia.edu/biostat/teaching/statcomp for links to some good examples (although for more complex analyses than you need)." Here is what he says (excellent Harrell's course material):
+ Graphical (GUI, mouse, menus)
- Easier to learn
- Less flexible
- Becomes repetitive when tasks repeated
- Hard to reproduce results
+ Command languages
- Harder to learn User Interfaces
- More flexible and powerful
- Can save commands in scripts to replay when data updated or corrected, or to do similar analyses
- Can write generic commands (macros, functions) to make it easy to run different analyses that have same structure

- Martin Henry H. Stevens [HStevens@muohio.edu] wrote: Command line approaches allow me to replicate my work, and allow my students to replicate their work, AND allow me to replicate my students' work."


- Ko-Kang Kevin Wang [Ko-Kang@xtra.co.nz] wrote: "When I was a student I
found it is the easiet way to master R; and now being a demonstrator I found
students find it easy to learn"

- There is also the question that the S language is very didactic (it helps
students to understand statistics). By hidding it with a point and click
user interface, this benefit could be lost. For instance, Marc Feldesman
[feldesmanm@pdx.edu] wrote: "Perforce, the students using R/S also learned
more about statistics, programming, and data management than any group of
students using the Point and Click software."

- But also, the command line teaching diverts from other teachings (John Fox
[jfox@mcmail.cis.mcmaster.ca]). He wrote: "Brian Ripley's point -- that
students can use a GUI-based package with little instruction and support --
is the key point for me. This isn't just a question of laziness: spending
time teaching students command-driven software that they may not use again
after the class, or may use too infrequently to become fluent, takes time
away from teaching other things."

- Jan de Leeuw [deleeuw@stat.ucla.edu] wrote: "Our programming staff is
working on a Cocoa GUI for R (and on R services, which makes it possible to
evaluate R expressions from any Cocoa application which has a text window).
One of the ideas is to customize this for teaching various courses, using
"course plugins".



And what about other users?
---------------------------
- It is evident that the UI is heavily dependent on the use of the software.
An expert using advanced statistics on a daily basis will look for
performance, flexibility and efficiency more than facility. An occasional
user will prefer a more intuitive interface, even at the cost of rigidity,
performance and flexibility.

- Peter Dalgaard BSA [p.dalgaard@biostat.ku.dk] wrote:"however, there's a
fairly large group of people who need to do statistics only at quite long
intervals -- they spend years collecting data, and when they get to
analyzing them they don't want to (re)learn a whole language. In some cases
there is also an amount of anti-intellectualism involved ("Just show us what
to do!"), which the statistician should arguably fight against but that can
be hard. For those people, we really need a simplified interface, or they'll
come back to haunt us with questions about how to solve the hard issues
(that they inevitably run into) in SPSS...."

- A.J. Rossini [rossini@blindglobe.net] wrote about free software: "(there
is a bit more work to do to make ESS + SWeave + Noweb + XEmacs do precisely
this, but it suffers from the same problems mentioned for the GUI (lack of
time, comparatively "amateur" (others' words/opinions, not necessarily mine)
interface compared to say a half-decent MS Windows program."



Misc ideas:
-----------
- Duncan Temple Lang [duncan@research.bell-labs.com] wrote: "A little more
than a year ago, we developed an R plugin for Gnumeric as part of the
Omegahat project.  It embeds R directly within Gnumeric rather than using a
slave process.  One can register R functions as Gnumeric function, and
additionally, from within R one can access, edit and create worksheets and
their contents. The "package" is available from
http://www.omegahat.org/RGnumeric (It may need some minor surgery to be
consistent with recent versions of Gnumeric, but these are not structural
changes.)"

- Duncan Temple Lang [duncan@research.bell-labs.com] wrote: "To implement
these ideas, we are using the RGtk package to build specialized GUIs; the
gtkDevice package for embedding graphics devices in HTML widgets; using R &
GGobi for interactive/direct manipulation graphics; and currently exploring
embedding R within AbiWord, the Gnome word processor.  All of these tools
share Gtk as a common fundamental component, and that is one of the reasons
for pushing on the RGtk package.  Also, we can exploit CORBA since these
tools have support from Orbit, the Gnome layer on top of CORBA."

- Jonathan Baron [baron@cattell.psych.upenn.edu] said that a reference card
is what students need more than a GUI. "It serves some of the functions of
the gui, namely, reminding people who do not use a program every day of the
basic commands."

- Brian Ripley [ripley@stats.ox.ac.uk] "(Some of) the R developers would
love to be able to provide a high-quality cross-platform GUI interface.
There are various possible starting points (Java and wxWindows being the
others most frequently mentioned).  But it is thought to be a large job. A
GUI can be a good way to write command lines for you.  The discussions here
are all about support: Minitab abd SPSS are used for basic  courses just
because no one needs to write any documentation nor provide any
hand-holding."

- Tony Plate [tplate@blackmesacapital.com] wrote: "Maybe something of wider
value than a GUI (for teaching and other purposes) could be an interface
like that in Mathematica (and Maple?), which supports mathematical notation
and plots in a command window.  This allows showing students exactly what
they need to do to accomplish some task, and well as the all the output they
should see."

- Good points for Splus: the object browser and the interactive editing of
the graphics.

Rohan Sadler [rsadler@agric.uwa.edu.au]: "Extensive help tree with multiple
views: (1) functions organized by key words; (2) functions organized by
branches of statistics; (3) functions organized alphabetically; (4)
statistical concepts [e.g., (a) group comparisons, each type such as
two-sample comparison further divided into parametric and nonparametric; (b)
regression, (c) EDA, ...]; (5) compendium by needed result; (6) manuals.
For a basic stat class, view (4) needs to be prominent, and under each test
or method there needs to be a representative example (e.g., for a Wilcoxon
2-sample test of y by levels of g type ..... but it's better to think of
this as a special case of the Kruskal-Wallis test which may be obtained by
typing .... or the Spearman test which may be obtained by typing ....)."

- At the command line, you have to think to what you are doing => you have
to know your analyses, not the case for point and click (chose random
options, click OK and there is a chance the program compute something, of
course, something meaningless, but still something!

- How to automatically generate input dialogs "a la Splus" for R functions
[PhG: is it even desirable]?

- A comparison of R to S-Plus V6 would be at least a starting point [PhG:
yes if we consider the Splus GUI is a good basis... and what if it is not?]

- GUI => difficult to go back to what was done.

- GUI is not good for repeated analyses.

- Synthax highlighting, debugging, quick tips on functions, (semi) automatic
"apropos" lists, context help could be nice additions, even to the bare CLI
of R!

- Thomas Lumley [tlumley@u.washington.edu]: "Interested parties might look
at crossbreeding this with the object browser in Bioconductor's tkWidget
package."

- Beginners have difficulties finding functions => a more fully
cross-referenced help system, and to fill arguments => might be aided by
adding code-completion to the UI - something ESS already does for many
packages and libraries.

- Zed A. Shaw [zedshaw@zedshaw.com]: "Myself and a Professor at a California
university are currently designing a simplified R GUI that is targeted at
Linux, FreeBSD, MacOSX, and Windows and will provide an interface to doing
"canned" procedures and project based operations.  I'm currently building
the initial interface design and then we will start a project on sourceforge
for it.  The project will be opensource. The tentative name for it is
obveRsive woRkbench, and it is currently way to early to even guess at a
release date or even if the project is actually feasible.
We are planning to do the following:
1.  Have various output viewing capabilites, but mostly an HTML/graphics
viewer.
2.  Project based operation, where students can organize their work by
projects.
3.  Very simple data editing capabilities for different data types.
4.  Dynamic "canned" routines with point-and-click-fill-in-dummy-form
operations.  The routines will be extendable, so you'll be able to add your
own when you need.
5.  Using the CRAN update/install facility to make it easy to install new
obveRsive packages.
6.  Utilizing a cross platform GUI system, either FLTK or wxWindows in C++
or Java (depending on which is easier and more stable).
7.  Heavily user tested with a focus on usability, targeting students and
regular folks, not professors of statistics :-)"

- PhG: Here is a short decription of the SciViews project, with an
evaluation of work already done.
>
> - Plug to connect to the R engine using DCom (including graph windows)  -
> 90% done
> - Plugs and connections manager (only locally for the moment)           -
> 75% done
> - Multi-document interface with dockable toolbars and windows           -
> 90% done
> - Console windows for direct command-line access of kernels             -
> 80% done
> - Report windows with RTF formatting and graphs/images embedding        -
> 50% done
> - Code edition windows with synthax highlighting, quick tips,...        -
> 50% done
> - Spreadsheed-like matrix/data frame editor                             -
> 0% done
> - Web-based direct online help in the interface                         -
> 30% done
> - Object explorer                                                       -
> 10% done
> - Templates manager (dockable window)                                   -
> 25% done
> - Tips/Help/Error dockable message window                               -
> 25% done
> - Customizable menus and toolbars                                       -
> 60% done
> - Customizable dialog boxes                                             -
> 0% done
> - Plug for Splus                                                        -
> 0% done
> - Plug for Octave                                                       -
> 0% done
> - Plug for Scilab                                                       -
> 30% done
> - Plug for Matlab                                                       -
> 30% done
> - Plug for OX                                                           -
> 30% done
> - Plug for Mathematica                                                  -
> 75% done
> - Messages passing between kernels                                      -
> 0% done
> - ODBC connections & data import/export (but also done within kernels)  -
> 0% done
> - Direct access from Excel or WinWord                                   -
> 20% done

- Comment on the latter: The design sounds good but I think the inability to
run under Linux is a major problem.  I think that the GUI by necessity has
to run on several platforms.  That way you will get assistance from many
other programmers.  -Frank Harrell

- Kurt Hornik [hornik@ci.tuwien.ac.at]: I may be forced to supervise a
project for building an 'SPSS-style GUI' on top of R, whatever this means.
Argh.


- Summary of Rohan Sadler [rsadler@agric.uwa.edu.au] : "The following ideas
were voiced, many of which already have applications:
1) Icons on desktops that lead to GUI's that perform the analysis. Should be
sufficient, and easy to represent as a "toolbox" (essentially a menu bar).
2) Web Servers. I still have a problem with look and feel, though these can
be reasonably easy to solve. Again, if there was an equivalent of it in the
current workplace, rather than specifically  for teaching purposes, then I'd
support it.
3) Turning to Linux. Sorry, where I come from this is not do-able in the
near future, for much the same reasons as why a GUI would be more suitable.
Also we are a large faculty whose administration is already uptight about
how much it has invested in computer resources and changes overnight are not
in the business plan (sigh! I use linux and this fact brings tears to my
eyes).
4) Tcl/Tk interface. Some comments were on the suitability of it's cross
platform compatibility. As to look and feel I use sometimes the Tcl/Tk
interface for the GIS GRASS, and this is more than good enough, because
again it is a concept that is easily exported to the stats packages that
these students are generally likely to meet in the workplace.
5) The Khoros idea of Tim Keitt's sounds good. "



Script editing and IDE:
-----------------------
- Absent from most R interfaces (except the MacOS one). The user is supposed
to use its own preferred text editor.

- Lack of scripting window, but WinEd, Emacs, Textpad, WinEdit, WinEdt,
Multi-Edit 9, Visual SlickEdit, Kate, ... [PhG: to do, propose a more
exhanstive list with links for editors and IDE in R GUI projects web page].

- Need for an integrated IDE (Mark Myatt [mark@myatt.demon.co.uk]): a full
featured IDE with:
  1. A syntax highlighting editor

  2. Code completion features such as automatic insertion of function
templates.

  3. An ability to submit a file of R commands and capture the output in an
output window.

  4. Capturing of errors in code integrated with editor. Some form of
debugging / error tracking / stack tracing would be nice.

  5. An object inspector showing the objects available in the working
environment ... it would be nice (e.g.) to be able to click on a data.frame
reference and see column names, classes, &c. And to be able to paste these
into the editor.

  6. Basic project management functions.

  7. Help system and language guide integrated.

- ESS/XEmacs does this.

- Using args() for quicktip: impossible to type args(...) in the middle of
your function. But problem with methods: args(plot), it's not going to be
terribly informative.

- Uwe Ligges has spent much time to provide the R-WinEdt support files, see:
http://cran.r-project.org/other-software.html.

- Phlippe Grosjean [phgrosjean@sciviews.org) uses textpad and proposes some
synthat highlighting and macros additions for scripmt and R documentation on
the R Gui projects web pages.

- Frank E Harrell Jr [fharrell@virginia.edu] uses the free version of
Notetab (www.notetab.com) which supports macros, and the macro file below.
Ctrl-space (repeat last macro) will send any highlighted text to an open
GUI. [PhG: ask him the permission to add its config files on the R GUI
Projetcs web pages]:

^!FocusDoc
;Save the file if it has been modified
;^!Save
;Select the highlighted block.
^!If ^$GetSelSize$ = 0 END ELSE SelectLines

:SelectLines
:GetSelection
^!Set %AnyText%=^$GetSelection$
;Write the selected text to a temporary file in the Windows temp. dir.
^!Set %fileName%=^$GetTmpPath$std0001.r
^!Set %fileName%=^$StrReplace(\;/;^%fileName%;True;False)$

^!TextToFile ^%fileName% ^%AnyText%
; Copy "source" to the clipboard
^!SetClipboard source("^%fileName%")
; Switch to R
^!FocusApp RGui*
;ESC to clear the Command window, paste the command, hit enter
^!Keyboard ESC
^!Keyboard CTRL+V
^!Keyboard ENTER


... and his "favorite reg-file to start R with right mouse button in
Explorer in a given directory:

REGEDIT4
[HKEY_CLASSES_ROOT\Directory\shell\Run R]
[HKEY_CLASSES_ROOT\Directory\shell\Run R\command]
@="\"C:\\Program Files\\R\\rw1050\\bin\\Rgui.exe\" --internet2"




The graphical toolkit problem:
------------------------------
- A graphical user interface is based on a toolkit. As R runs on several
systems, the toolkit should be also plateform-independent. There are also
some other constraints, and in the counterpart, there are several candidates
(tcl/tk, gtk, java,...). It is still hard to choose one. A deeper discussion
is required here (need to be triggered in the R-sig-gui!!!).

- There is an article in R News (vol.1, n°3) by Peter Dalgaard
[p.dalgaard@biostat.ku.dk] on the tcltk package, and the latter includes a
few nice examples. You need to install Tcl/Tk: it is free and can run on
many OSes...

- Prof Brian Ripley [ripley@stats.ox.ac.uk] about the tcltk package: "But
the chief drawback is look-and-feel:  Windows users have very high
expectations of the uniformity of their interface. A secondary one is the
difficulty of coordinating two event-driven systems."

- Alternate toolkits: Java, wxWindows, Gtk, KDE (Qt). Java GUI slow,
wxWindows not very attractive, Tcl/Tk don't has the right look and feel for
Windows users.

- Peter Dalgaard BSA [p.dalgaard@biostat.ku.dk] wrote: "Duncan Temple Lang
also has some higher-level plans for general GUI integration that sound
promising."

- Tcl/tk not on Mac (?).

- Peter Dalgaard [p.dalgaard@biostat.ku.dk]: "Basically *any* X11, it's just
that the user interface tends to look like Motif. In principle Tcl/Tk works
with classic Mac, but noone has had the stamina to sort out the event-loop
integration issues and with OS X marching on, it is hardly worth the trouble
now. Some Tk widgets are actually made to provide a closer match to the
Windows look and feel, and you can configure their appearance and behaviour
considerably, although doing so tends to remove the simplicity which is the
major attraction of using Tcl/Tk in the first place."




Web interface to R:
-------------------
- RWeb: http://www.math.montana.edu/Rweb/. Example: A rather amazing
implementation of time series analysis based on R and Javascript:
http://ssnt.ism.ac.jp/inets2/title.html. This web server creates separate
browser windows for data entry, graphics, and procedure selection. These
windows are dynamic. For example, after entering data there is no submit
button to submit the data. The procedure selection window is used to start
the analysis, which uses the current values in the data window. Another Rweb
example: An R web server for robust rank-based linear models
(http://www.stat.wmich.edu/slab/RGLM/).

- Rcgi, a "lighter alternative to Rweb with more 'reasonable' dependencies"
(http://stats.mth.uea.ac.uk/Rcgi/index.html).



Other interests:
----------------
- Kenneth Cabrera [krcabrer@perseus.unalmed.edu.co]: "And if there is the
possibility to create a group to start a small and basic GUI as a package I
will like to help in that project."

- Ernesto Jardim [ernesto@ipimar.pt]: I volunteer to help but I don't have a
server or experience on web sites to make it my self. So if there will be a
coordinator I'm available to
help.

- Warnes, Gregory R [gregory_r_warnes@groton.pfizer.com] For some time, I've
been brewing thoughts about what would make a really useful GUI interface
for statistics packages.  Unfortunately, I'm not in a
position to do any coding, but I would *like* to share these thoughts with
someone who might actually start to put them into practice...  Would either
of you be interested?

...........]<(({°<...............<°}))><...............................
( ( ( ( (
 ) ) ) ) )      Philippe Grosjean
( ( ( ( (
 ) ) ) ) )      IFREMER Nantes - DEL/AO
( ( ( ( (       rue de l'Ile d'Yeu, BP 21105, 44311 Nantes Cedex 3
 ) ) ) ) )      tel: (33) 02.40.37.42.29, fax: (33) 02.40.37.42.41
( ( ( ( (	e-mail: philippe.grosjean@ifremer.fr
 ) ) ) ) )
( ( ( ( (      "I'm 100% confident that p is between 0 and 1"
 ) ) ) ) )                                L. Gonick & W. Smith (1993)
.......................................................................