Building Custom GUIs for R

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Building Custom GUIs for R

vioravis
I am looking to build simple GUIs based on the R codes I have. The main objective is to hide the scary R codes from non-programming people and make it easier for them to try out different inputs.

For example,

1. The GUI will have means to upload a csv file which will be read by the R code.

2. A button to preprocess data (carried out by a R function behind)

3. A button to build some models and run simulations

4. Space to display visual charts based on the simulations results

5. Option to save the results to a csv file or something similar.

Are there any tools currently available that enable us build GUIs??? (MATLAB has a GUI builder that enables the users build custom GUIs).

Can we make a exe of such GUI (with the R code) and let people use it without having to install R???

Any help on this would be much appreciated??

Thank you.

Ravi





Reply | Threaded
Open this post in threaded view
|

Re: Building Custom GUIs for R

Rubén Roa
Check the PBSModelling package.

HTH

Rubén

____________________________________________________________________________________

Dr. Rubén Roa-Ureta
AZTI - Tecnalia / Marine Research Unit
Txatxarramendi Ugartea z/g
48395 Sukarrieta (Bizkaia)
SPAIN



> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre de vioravis
> Enviado el: viernes, 20 de mayo de 2011 8:52
> Para: [hidden email]
> Asunto: [R] Building Custom GUIs for R
>
> I am looking to build simple GUIs based on the R codes I
> have. The main objective is to hide the scary R codes from
> non-programming people and make it easier for them to try out
> different inputs.
>
> For example,
>
> 1. The GUI will have means to upload a csv file which will be
> read by the R code.
>
> 2. A button to preprocess data (carried out by a R function behind)
>
> 3. A button to build some models and run simulations
>
> 4. Space to display visual charts based on the simulations results
>
> 5. Option to save the results to a csv file or something similar.
>
> Are there any tools currently available that enable us build
> GUIs??? (MATLAB has a GUI builder that enables the users
> build custom GUIs).
>
> Can we make a exe of such GUI (with the R code) and let
> people use it without having to install R???
>
> Any help on this would be much appreciated??
>
> Thank you.
>
> Ravi
>
>
>
>
>
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Building-Custom-GUIs-for-R-tp353
> 7794p3537794.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Building Custom GUIs for R

Jonathan Gabris
You can also look at:
- Journal of Statistical Software - dec 2010, vol 37, Issue 8 (for using
RGtk2)
- RNews vol. 6/4, october 2006 (for using tcltk)


Jonathan


On 20/05/2011 10:42, Rubén Roa wrote:

> Check the PBSModelling package.
>
> HTH
>
> Rubén
>
> ____________________________________________________________________________________
>
> Dr. Rubén Roa-Ureta
> AZTI - Tecnalia / Marine Research Unit
> Txatxarramendi Ugartea z/g
> 48395 Sukarrieta (Bizkaia)
> SPAIN
>
>
>
>> -----Mensaje original-----
>> De: [hidden email]
>> [mailto:[hidden email]] En nombre de vioravis
>> Enviado el: viernes, 20 de mayo de 2011 8:52
>> Para: [hidden email]
>> Asunto: [R] Building Custom GUIs for R
>>
>> I am looking to build simple GUIs based on the R codes I
>> have. The main objective is to hide the scary R codes from
>> non-programming people and make it easier for them to try out
>> different inputs.
>>
>> For example,
>>
>> 1. The GUI will have means to upload a csv file which will be
>> read by the R code.
>>
>> 2. A button to preprocess data (carried out by a R function behind)
>>
>> 3. A button to build some models and run simulations
>>
>> 4. Space to display visual charts based on the simulations results
>>
>> 5. Option to save the results to a csv file or something similar.
>>
>> Are there any tools currently available that enable us build
>> GUIs??? (MATLAB has a GUI builder that enables the users
>> build custom GUIs).
>>
>> Can we make a exe of such GUI (with the R code) and let
>> people use it without having to install R???
>>
>> Any help on this would be much appreciated??
>>
>> Thank you.
>>
>> Ravi
>>
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://r.789695.n4.nabble.com/Building-Custom-GUIs-for-R-tp353
>> 7794p3537794.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Building Custom GUIs for R

Jonathan Daily
In reply to this post by vioravis
Some good tcltk examples can be found online [1]. I have also found
the fgui package on CRAN [2], though I have not actually used it yet.

[1] http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/
[2] http://cran.cnr.berkeley.edu/web/packages/fgui/index.html

On Fri, May 20, 2011 at 2:52 AM, vioravis <[hidden email]> wrote:

> I am looking to build simple GUIs based on the R codes I have. The main
> objective is to hide the scary R codes from non-programming people and make
> it easier for them to try out different inputs.
>
> For example,
>
> 1. The GUI will have means to upload a csv file which will be read by the R
> code.
>
> 2. A button to preprocess data (carried out by a R function behind)
>
> 3. A button to build some models and run simulations
>
> 4. Space to display visual charts based on the simulations results
>
> 5. Option to save the results to a csv file or something similar.
>
> Are there any tools currently available that enable us build GUIs??? (MATLAB
> has a GUI builder that enables the users build custom GUIs).
>
> Can we make a exe of such GUI (with the R code) and let people use it
> without having to install R???
>
> Any help on this would be much appreciated??
>
> Thank you.
>
> Ravi
>
>
>
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Building-Custom-GUIs-for-R-tp3537794p3537794.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



--
===============================================
Jon Daily
Technician
===============================================
#!/usr/bin/env outside
# It's great, trust me.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Building Custom GUIs for R

jverzaniNWBKZ
In reply to this post by vioravis
vioravis <vioravis <at> gmail.com> writes:

>
> I am looking to build simple GUIs based on the R codes I have. The main
> objective is to hide the scary R codes from non-programming people
> and make it easier for them to try out different inputs.
>

... snip ...


> Are there any tools currently available that enable us build GUIs??? (MATLAB
> has a GUI builder that enables the users build custom GUIs).
>


R has lots of packages to assist in making GUIs. Quickly, some are:

tcltk: a recommended package with R for quite awhile. See Rcmdr and GrapheR
for two excellent packages that use it.

RGtk2: an add-on package to integrate R with the GTK libraries (as well
cairoDevice).  See RGtk2DfEdit, playwith and latticist for example usage,
and rattle to see how  GTK's GUI design tools can be integrated in.

qtbase: New, not yet on CRAN. Integrates R with Qt libraries. To see an example,
fly out to San Franciso and catch a ride down to Google:
http://www.meetup.com/R-Users/events/18876401/

The gWidgets packages provide an easier to learn but more limited
interface to the above packages.

In addition, R can interface with other languages: rJava (deducer),
rpy2(RedR), RCpp
(http://dirk.eddelbuettel.com/blog/2011/03/25/#rinside_and_qt), ...

--John



> Can we make a exe of such GUI (with the R code) and let people use it
> without having to install R???
>
> Any help on this would be much appreciated??
>
> Thank you.
>
> Ravi
>
> --

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Building Custom GUIs for R

barry rowlingson
In reply to this post by vioravis
On Fri, May 20, 2011 at 7:52 AM, vioravis <[hidden email]> wrote:

> Are there any tools currently available that enable us build GUIs??? (MATLAB
> has a GUI builder that enables the users build custom GUIs).

 Another option nobody has mentioned yet is to make it a web-based
system, and generate your dialogs using HTML FORM elements. R comes
with a basic web server engine now so it might be possible to make it
all self-contained.

> Can we make a exe of such GUI (with the R code) and let people use it
> without having to install R???

 That's another FFAQ to which the answer is usually 'no', although you
can of course distribute R alongside your application (by closely
following the terms of the R license agreement) and say in your
install notes "first install R by running setupR.exe" or whatever.

Barry

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Building Custom GUIs for R

Smith, Dale
Another alternative is to distribute an exe (built in C# or tcl) which
communicates with a web service. The web service may then call R on a
private server (behind a firewall) using Rserve. In this way the R code
is not distributed to the customer, but remains in the remote web
service. This also separates changes to the R code from the actual gui
used.

I prototyped this solution a few years ago using Windows and it worked
very well.

Thanks,
Dale Smith, Ph.D.
Senior Financial Quantitative Analyst
Risk & Compliance
Fiserv.
107 Technology Park
Norcross, GA 30092
Direct NYC: 212-419-3242
Direct Norcross: 678-375-5315
Mobile: 678-982-6599
Mail: [hidden email]
www.fiserv.com

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
On Behalf Of Barry Rowlingson
Sent: Friday, May 20, 2011 9:18 AM
To: vioravis
Cc: [hidden email]
Subject: Re: [R] Building Custom GUIs for R

On Fri, May 20, 2011 at 7:52 AM, vioravis <[hidden email]> wrote:

> Are there any tools currently available that enable us build GUIs???
(MATLAB
> has a GUI builder that enables the users build custom GUIs).

 Another option nobody has mentioned yet is to make it a web-based
system, and generate your dialogs using HTML FORM elements. R comes
with a basic web server engine now so it might be possible to make it
all self-contained.

> Can we make a exe of such GUI (with the R code) and let people use it
> without having to install R???

 That's another FFAQ to which the answer is usually 'no', although you
can of course distribute R alongside your application (by closely
following the terms of the R license agreement) and say in your
install notes "first install R by running setupR.exe" or whatever.

Barry

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Building Custom GUIs for R

vioravis
In reply to this post by vioravis
Thanks everyone. I will try out the packages you have mentioned.

Ravi
Reply | Threaded
Open this post in threaded view
|

Re: Building Custom GUIs for R

Bert Gunter
In reply to this post by barry rowlingson
... and yet another, on Windows ONLY and with limited functionality --
which nevertheless sufficed for my unsophisticated needs -- is to use
several built-in R functions in the utils package (the win... ones
courtesy of Duncan Murdoch) that access native Windows functionality.
See

?winMenuAdd
?select.list
?winDialog
?winProgressBar
?choose.files

for some examples and links to others. (select.list and choose.files
are available on all OS's).

Cheers,
Bert

On Fri, May 20, 2011 at 6:17 AM, Barry Rowlingson
<[hidden email]> wrote:

> On Fri, May 20, 2011 at 7:52 AM, vioravis <[hidden email]> wrote:
>
>> Are there any tools currently available that enable us build GUIs??? (MATLAB
>> has a GUI builder that enables the users build custom GUIs).
>
>  Another option nobody has mentioned yet is to make it a web-based
> system, and generate your dialogs using HTML FORM elements. R comes
> with a basic web server engine now so it might be possible to make it
> all self-contained.
>
>> Can we make a exe of such GUI (with the R code) and let people use it
>> without having to install R???
>
>  That's another FFAQ to which the answer is usually 'no', although you
> can of course distribute R alongside your application (by closely
> following the terms of the R license agreement) and say in your
> install notes "first install R by running setupR.exe" or whatever.
>
> Barry
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



--
"Men by nature long to get on to the ultimate truths, and will often
be impatient with elementary studies or fight shy of them. If it were
possible to reach the ultimate truths without the elementary studies
usually prefixed to them, these would not be preparatory studies but
superfluous diversions."

-- Maimonides (1135-1204)

Bert Gunter
Genentech Nonclinical Biostatistics

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Building Custom GUIs for R

Jonathan Gabris
In reply to this post by vioravis
If you want a GUI that only communicates with R, and is not created
within R, you can use Qt.

Startup R.exe using a QProcess and send ready formatted commands to the
background R.exe whan you activate a control (button, slider,..)

I find this works well if you want a "just click on the button" type
interface.
As you can hide everything.



On 20/05/2011 15:39, vioravis wrote:

> Thanks everyone. I will try out the packages you have mentioned.
>
> Ravi
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Building-Custom-GUIs-for-R-tp3537794p3538539.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Building Custom GUIs for R

Greg Snow-2
In reply to this post by vioravis
I think that the Rcmdr package already does a lot of what you want, rather than starting from scratch you should check it out.  Rcmdr has the functionality of letting you write your own add-ins, so if it currently does not have the functions that you want you could just create an add-in to add that functionality to Rcmdr rather than writing your own.  There is also the Rexcel project which uses MSExcel as a front end to R (and uses the Rcmdr menus), so the non-programmer only has to deal with excel (and an extra menu bar) and all the scary R stuff is hidden.

If Rcmdr still has too many scary bits exposed, then you can at least look at the code and base yours off of those examples.  Or if you only want to provide a very limited set of options, then consider using a web based approach with html interface (as others have already mentioned).

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[hidden email]
801.408.8111


> -----Original Message-----
> From: [hidden email] [mailto:r-help-bounces@r-
> project.org] On Behalf Of vioravis
> Sent: Friday, May 20, 2011 12:52 AM
> To: [hidden email]
> Subject: [R] Building Custom GUIs for R
>
> I am looking to build simple GUIs based on the R codes I have. The main
> objective is to hide the scary R codes from non-programming people and
> make
> it easier for them to try out different inputs.
>
> For example,
>
> 1. The GUI will have means to upload a csv file which will be read by
> the R
> code.
>
> 2. A button to preprocess data (carried out by a R function behind)
>
> 3. A button to build some models and run simulations
>
> 4. Space to display visual charts based on the simulations results
>
> 5. Option to save the results to a csv file or something similar.
>
> Are there any tools currently available that enable us build GUIs???
> (MATLAB
> has a GUI builder that enables the users build custom GUIs).
>
> Can we make a exe of such GUI (with the R code) and let people use it
> without having to install R???
>
> Any help on this would be much appreciated??
>
> Thank you.
>
> Ravi
>
>
>
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Building-
> Custom-GUIs-for-R-tp3537794p3537794.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.