[R] re: GUI's for teaching

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Jun 25 19:30:52 CEST 2002


ripley at stats.ox.ac.uk writes:

> On Tue, 25 Jun 2002, Emmanuel Paradis wrote:
> 
> > Hi,
> >
> > Have you seen the tcltk package? I believe it is a better option than the
> > one you outline in your message. Why develop a Windows-only GUI? Maybe in a
> > few years your teaching department will give up Windows for Linux (for the
> > reasons you wrote about R: it is free, advanced, and adaptable). There is
> > an article in R News (vol.1, n°3) by Peter Dalgaard on the tcltk package,
> > and the latter includes a few nice examples.

...although parts of it need to be updated due to recent changes in
the package. I hoped to get that done for the current issue, but
May/June got a bit too busy.

> > You need to install Tcl/Tk: it
> > is free and can run on many OSs.
> 
> Well it can run under a few OSes, principally Motif-based X11 and Windows.
> (It does not run on classical MacOS with R.)  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.

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.
 
> (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.

Don't count out Gtk, which has cross-platform capabilities in the
works. It looks very interesting (and the icons are prettier than
those of Tk), but it is early days. 

I still want to see a Java GUI running decently on a remote machine
over X before I have any faith in that. (That has to be possible, but
Java designers seem to have made some spectacularly poor decisions in
the area, so that some of the popular Java classes essentially only
work on the local machine. Those who have tried S-PLUS 6.0 remotely
over a 10Mb network will know what I mean, but that's not the only
program having problems.)

Writing the GUI interface is a fairly large job, but maybe holding us
back more is a few hard problems such as finding the proper way of
hotwiring a Tcl/Tk console into R (without which it becomes difficult
to define a top menu) or properly embedding X11 graphics in a Tk
window (Tom Vogels nearly solved that over a year ago). Then there's
the problem of figuring out a useful paradigm for writing the
interfaces themselves, so as to avoid duplicating code which is the
sort of thing that might turn out to be simple and maybe not. And of
course there's the issue of the donkey starving itself to death,
unable to decide between two bales of hay....
 
For whatever it's worth, I plan to play a bit with the tcltk package
over Summer. Duncan Temple Lang also has some higher-level plans for
general GUI integration that sound promising. 

> > BTW, are GUIs the best way to teach stats? I recommend newcomers to R to
> > save their command lines in a text file in order to able to source() them
> > later. Quite often you need to re-do an analysis, because you have new
> > data, you want to change a parameter, fit new models, ...
> 
> 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.

My take on that is that for people who'll need to work with data
analysis an a daily basis, there's no way around learning the command
line. You simply don't get the "information at your fingertips"
feeling any other way. 

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....

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list