Skip to content
Prev 18066 / 63424 Next

[R-gui] R GUI considerations (was: R, Wine, and multi-threadedness)

Hi All,

While I don't have the "sweat equity" that either Philippe Grosjean  
and James Wettenhall have in developing R GUI's, I have been involved  
in two different projects (obveRsive as part of the founding  
development team, and R Commander as a contributor) over the past  
three years. In addition, my interest is in R GUIs that are not  
platform specific (such as Philippe's SciViews for Windows or Thomas  
Friedrichsmeier's RKward for KDE). Based on a combination of both my  
experience and my interest, I want to make two observations, and  
offer three opinions about issues people should consider when  
thinking about what they can do to move GUI's for R forward.

My first observation is that gluing R to any external, platform  
independent, widget tool kit is hard. James indicates that it isn't  
easy for wxWidgets. My memory is he got it to work under Window's,  
but had a hard time making it work under Linux, and Jan de Leeuw also  
found it to be a real challenge just to get the RSPython layer to  
work under Mac OS X. On the obveRsive project we decided to use the  
Fox tool kit because (1) it had a larger selection of more "modern"  
widgets compared to Tk, and (2) it was the only multi-platform  
toolkit that actually worked under Windows, Linux, and Mac OS X  
platforms at the time we started the project in late 2002 (at that  
time wxWindows hadn't actually been ported to OS X). In order to use  
the Fox toolkit, we decided to use R as a backend. However, we, along  
with a number of other failed early projects (we pretty much decided  
to admit the demise of obveRsive this past week), found this to be a  
Herculean task (Zed Shaw in his work on obveRsive spent many  
frustrating nights trying to think of ways to develop a backend  
approach that worked quickly and consistently). Ultimately, R does  
not behave the way Perl, Python, Ruby, and Tcl/Tk do, which makes  
gluing it to an external GUI toolkit a real chore.

The second observation is that the R Tcl/Tk package is incredibly  
robust (the efforts of Peter Dalgaard and others who have worked on  
this effort should really be applauded in my opinion). I've used  
Rcmdr (based on the R Tcl/Tk package) successfully in classes where  
students used a mix of Windows and Mac OS X machines. To be honest,  
that it works at all, let alone that it is so rock solid, under Mac  
OS X simply amazes me since the Tcl/TK widgets use a different  
windowing system (X11) than the R console application (run under  
Aqua) in a standard, CRAN based, setup on OS X.

My first opinion is that too much bandwidth on the R-sig-gui mailing  
list has been spent on philosophical arguments about which toolkit is  
the "right" one to use. From a practical perspective, the Tk toolkit  
works well on all major platforms. The only real potential  
alternative for multi-platform application seems to be Java (as  
Philippe indicates, GTK2 is problematic under Windows, but also has  
some issues under OS X). However, only the JGR project appears to be  
using Java for an ambitious multi-platform application. At this  
point, I would really like to hear Markus Helbig's, Simon Urbanek's,  
Martin Theus's, and other JGR developers' opinions about the  
suitability of Java as a general tool for developing GUI's for R  
since they would have well informed opinions on this topic.

Second, it is my belief that there is a huge potential benefit to  
devoting efforts to simplify the use of the available working tool  
kits (i.e., the R Tcl/Tk package and Java) so that it is easier to  
develop GUI dialogs for a package or a specific procedure. To that  
end, John Fox has developed a number of macro-based "helper  
functions" for Rcmdr that greatly simplifies the creation of GUI  
dialogs for this package. My guess is that some of these could be  
fairly easily included as part of the R Tcl/Tk package. Moreover,  
other helper functions, based on John's approach, could also be  
developed. Going a bit further, as part of the obveRsive project,  
Thomas Friedrichsmeier wrote a module that enabled obveRsive dialog  
writers to write their dialogs using xml tags. His xml tags approach  
really simplified dialog creation. However, porting what he did for  
obveRsive to R Tcl/Tk would be a very difficult task, but one that is  
worth considering.

  My final opinion (which is focused on the R Tcl/Tk package) is that  
having a limited and "ugly," but working, set of widgets is much more  
important than having an extensive collection of "modern" widgets  
that behave badly, or are only available for some OSs. This is not to  
say that I think no effort should be devoted to expanding the set of  
widgets available under the R Tcl/Tk package, rather, I think there  
is a need for a conversation and consensus about which additional  
widgets would likely provide the greatest improvement in GUI  
applications developed under R as a way of prioritizing any efforts  
in this area, and that the goal of these efforts should be to make  
the desired widgets available under all major operating systems on  
which R runs.

Overall, my belief is that R already has a number of useful tools for  
developing GUIs, and that there is probably much greater return to  
efforts to improve the usability of these existing tools than in  
developing completely new toolkits or developing an API from scratch  
as this moment in time.

My apologies for the length of this post.

Dan
On 15-Oct-05, at 8:27 PM, James Wettenhall wrote:

            

Thread (27 messages)

Philippe GROSJEAN R GUI considerations (was: R, Wine, and multi-threadedness) Oct 15 Gabor Grothendieck R GUI considerations (was: R, Wine, and multi-threadedness) Oct 15 Philippe GROSJEAN R GUI considerations Oct 15 Gabor Grothendieck R GUI considerations Oct 15 Duncan Murdoch R GUI considerations Oct 15 Duncan Temple Lang R GUI considerations (was: R, Wine, and multi-threadedness) Oct 15 James Wettenhall R GUI considerations (was: R, Wine, and multi-threadedness) Oct 15 Philippe GROSJEAN R GUI considerations Oct 16 Brian Ripley R GUI considerations (was: R, Wine, and multi-threadedness) Oct 16 Dirk Eddelbuettel R GUI considerations (was: R, Wine, and multi-threadedness) Oct 16 Thomas Friedrichsmeier R GUI considerations (was: R, Wine, and multi-threadedness) Oct 16 Philippe GROSJEAN R GUI considerations Oct 16 Marc Schwartz R GUI considerations (was: R, Wine, and multi-threadedness) Oct 16 A.J. Rossini R GUI considerations (was: R, Wine, and multi-threadedness) Oct 16 Dan Putler R GUI considerations (was: R, Wine, and multi-threadedness) Oct 17 Hin-Tak Leung R GUI considerations (was: R, Wine, and multi-threadedness) Oct 17 Philippe GROSJEAN R GUI considerations Oct 17 Thomas Friedrichsmeier R GUI considerations Oct 17 John Fox R GUI considerations (was: R, Wine, and multi-threadedness) Oct 17 Richard Haney R GUI considerations (was: R, Wine, and multi-threadedness) Oct 17 James Wettenhall R GUI considerations (was: R, Wine, and multi-threadedness) Oct 17 Peter Dalgaard R GUI considerations (was: R, Wine, and multi-threadedness) Oct 17 Duncan Temple Lang R GUI considerations Oct 17 Philippe GROSJEAN R GUI considerations Oct 17 Duncan Temple Lang R GUI considerations Oct 17 Philippe GROSJEAN R GUI considerations Oct 17 David Meyer R GUI considerations Oct 20