[R] Building GUI for custom R application

mah harwood262 at gmail.com
Tue Apr 14 21:46:36 CEST 2009


If the desired end-state is a regression model and the appropriate
diagnostics, the Rcmdr package contains the necessary tools.  Rcmdr is
available for many Linux distribuitons as well as for Windows, and it
is able to do much more than import-and-regress.  I think the package
was built from Tcl/Tk.  If the goals, however, are learning to build a
GUI and incorporating custom features within it, then the other posts
are pointing in the appropriate direction.

Mike

On Apr 14, 10:40 am, Bert Gunter <gunter.ber... at gene.com> wrote:
> Duncan Murdoch and Brian Ripley (I believe) have provided some limited but
> serviceable native Windows GUI functionality within R for Windows. See
> ?winMenuAdd, ?choose.files , ?select.list, ?getGraphicsEvent,?winProgressBar
> for examples and further links. Everything that you mention can be rather
> simply done using this functionality (I've done it).
>
> As others have said, much more extensive and powerful GUI functionality is
> available through tcltk and associated packages like gWidgets,TkWidgets, and
> others (including much stuff on Bioconductor). But beware! -- writing GUI's
> that provide complex functionality is difficult. Computer scientists, web
> designers, etc. have whole curricula devoted to this.
>
> Cheers,
> Bert
>
> Bert Gunter
> Genentech Nonclinical Biostatistics
> 650-467-7374
>
>
>
> -----Original Message-----
> From: r-help-boun... at r-project.org [mailto:r-help-boun... at r-project.org] On
>
> Behalf Of Gabor Grothendieck
> Sent: Tuesday, April 14, 2009 4:17 AM
> To: Barry Rowlingson
> Cc: r-h... at r-project.org; Harsh
> Subject: Re: [R] Building GUI for custom R application
>
> On Tue, Apr 14, 2009 at 6:54 AM, Barry Rowlingson
> <b.rowling... at lancaster.ac.uk> wrote:
> > On Tue, Apr 14, 2009 at 9:23 AM, Harsh <singhal... at gmail.com> wrote:
> >> HI R users,
> >> I would appreciate information/examples/suggestions on building GUIs
> >> for R applications.
> >> I am currently working on a project that would require the following
> >> functionalities :
>
> >> 1) Display a  window to the user. Provide a function to scan local
> >> drive and choose dataset file.
> >> 2) Display the column names for the user to choose the dependent
> >> variable and the independent variables.
> >> 3) Fit regression and display statistics.
>
> >> Item 2 provides an example of creating a regression application with
> >> slider controls for a parameter in loess function used in the example
> >> application in that paper.
> >> For documentation on RGtk the author recommends reading the Gtk
> >> tutorial and documentation. I seem to have difficulty in making sense
> >> of the Gtk documentation since most of it is in C and documentation is
> >> available for use of Gtk with Perl and Python. I am not a
> >> C/Perl/Python programmer.
>
> >  You should say "I am not _yet_ a C/Perl/Python programmer". Don't
> > limit yourself :)
>
> >> Moreover, I am creating a Windows Application and is using RGtk2 the
> >> only way to create a GUI for an R application?
> >> Or should I use the the VB approach and create the GUI separately and
> >> call R scripts where required to do the back-end computation?
>
> >  If you are to admit the possibility of becoming a Python programmer
> > (strongly recommended) I'd say you could do it with Python, Rpy, and
> > the Qt library. The basic example you've outlined (choose file, select
> > X and Y values, plot, display stats) would take about twenty minutes.
>
> >  In fact, I've done half the work already, in adding almost just such
> > functionality to Quantum GIS. See here:
>
> >  http://www.maths.lancs.ac.uk/~rowlings/Software/Spqr/
>
> >  where the second screenshot shows variable selection and diagnostic
> > plots of an lm from data in the GIS.
>
> >  Distributing such an application might be tricky since it requires R,
> > Rpy, PyQt4 to be installed or available, but it can be possible to
> > build Python code into Windows .exe files with some effort.
>
> Since you are using Windows (based on the fact you are considering
> VB) note that rpy2 does not work with the recent versions of
> python (as of a few months ago when I checked).
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.- Hide quoted text -
>
> - Show quoted text -




More information about the R-help mailing list