Skip to content

[R-gui] Developing a GUI

13 messages · j verzani, Wayne.W.Jones at shell.com, David L Lorenz +5 more

1 day later
#
Sebastian Mellor <sebble <at> sebble.com> writes:
Hi Sebastian,

A few things. gWidgets is much better with RGtk2 than tcltk, as the table 
widgets are nicer and there are more methods implemented. Some 
people have made very nice interfaces with gWidgetsRGtk2. Of course, 
the tcltk package is much easier than RGtk2 for users to install (for many it is
already done). If you really want to integrate in with Rcmdr, 
you might want to stick with tcltk. 

You might also consider the qtinterfaces work, especially if you have 
graphics in mind.

As for RStudio, I have on r-forge an experimental package gWidgetsWWW2, 
which is a rewrite of gWidgetsWWW to work with Rook. Most of the basic 
functionality is  there, but there are some areas to implement still. Certainly 
many bugs left. I can't get it working with the server version of RStudio, 
but have gotten it to work with the desktop version with windows. For 
such use there are no installation issues, but the GUIs implemented aren't 
quite as useful and debugging can be a bit of a chore. For serving 
through rapache, gWidgetsWWW is still the only choice. When Rook is 
integrated with rapache, that will hopefully change.

Have fun,

John



... cut ...
#
HI Sebastian, 

I would very much advocate the use of the rpanel package. In essence it
is essentially a suite of wrapper functions for building GUIs with tcltk
. 
The rp.cartoons demo is very good example of a nice GUI. 

Try the following: 

install.packages("rpanel")
library(rpanel)
rp.cartoons()

Regards, 

Wayne


-----Original Message-----
From: r-sig-gui-bounces at r-project.org
[mailto:r-sig-gui-bounces at r-project.org] On Behalf Of Sebastian Mellor
Sent: 07 June 2011 11:39
To: r-sig-gui at r-project.org
Subject: [R-gui] Developing a GUI

Hello all,

I am spending this Summer developing a GUI for the hyperSpec package in
R.
I have already done some preliminary research but now I am really
getting
started.  The full requirements are yet undetermined but we have several
desires as with most other GUIs, i.e., cross-platform, minimal
pre-requisites, easy to install.  After looking at several available
packages I am leaning towards gWidgets with either RGtk2 or TclTk layers
to
cover most platforms.  I am also considering providing basic plugins for
other packages like RCmdr to add a menu item to initiate any of the main
GUI
features.  The GUI we are looking to create is not a full featured
environment, but rather a collection of smaller functions to be chained.

While determining exactly what we require I am going to keep
investigating
the experience of using various GUI packages.  What are your experiences
with the available packages in terms of installation and reliability
when
making small GUIs or 'widgets'?

One environment I have been using personally for the last couple of
months
is RStudio (server edition), this has proved extremely useful when
working
between Uni and home.  I believe an API will be released eventually
allowing
the menu bar to be extended and I have just discovered that Rook will
work
from the web interface as it would from the desktop or any other console
that could spawn a browser window.  Does anyone have any experience with
using a web-based GUI?  This is probably out of the scope of my initial
aims
but if gWidgets, gWidgetsWWW, rApache, Rook, EXT JS, and the rest of it
all
worked together theoretically a gWidgets interface could also work on
the
web server too when using the RStudio console.  How unreasonable is
this?

Best regards,
Seb

P.S.  Any other comments and suggestions welcome.


_______________________________________________
R-SIG-GUI mailing list
R-SIG-GUI at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-gui
#
I know there were some rather lengthy discussions on the topic during the GSOC application process. It is my opinion that programing from within R is a very good way to get a working GUI quickly, but you are better served leaving R for something polished and professional looking.

ian

btw, you can also provide menu items for Deducer/JGR regardless of the toolkit you use.
On Jun 9, 2011, at 7:33 AM, David L Lorenz wrote:

            
#
Just to clarify my (admittedly controversial) opinion. I didn't mean that good GUIs can't be embedded within R, I meant that if you need to do something that goes beyond placing widgets in a window, you probably will want to write the GUI code in another language and call it from R. For example, speedR's GUI interactively calls R but is written in Java.

ian
#
Another option Iis to use the programming
language independent Glade app to build your GUI visually (for GTK,
and hence RGtk2). Basic (and sophisticated) GUIs can be quickly built
and saved as XML which can then be loaded through RGtk2.  Takes away
the hand coding of the GUI if that is a preference, so you mainly
focus on the callbacks. (The same XML file can even be instantiated as
Java, C, etc if you wanted to implement callbacks in those languages
and the call R underneath)

Another coding option using RGtk2 is found in Tom Taverner's RGtk2Extras package
which has a rapid deployment dialog making wrapper called run.dialog -
it wraps an R function with a GUI to seek all the required options.

GTK GUIs (in my opinion) look better than some other competing
toolkits - opinions differ. Runs trivially on Linux and on MS/Windows
(unless you end up with multiple installs of different versions of it
on MS/Windows - after which you have to work a little bit to clean up
your machine), and Mac OS/X though there are some issues with it on
the Mac at times.

Regards,
Graham