We have a set of R scripts, which process some data and produce some results. We want to make these scripts available to basic users, which are not used to commandline of R - we want to provide them some nice GUI, which would allow to:
- import/export data from MS Excel/Access easily (also supporting Copy/Paste if possible)
- allow user to change settings/parameters of the process
- should be running in MS Windows.
Is there any simple, scripting environment which would allow to develop such nice GUI for our R scripts as fast as possible? Need not necessarily be in R language.
You didn't say it had to be a desktop program. So
Jeroen Ooms'
hilarious openCPU project might be worth a look. He basically calls it statistical computing in the cloud. The guys has been really active recently (now that I checked the website again, I realized it's new again).Also, his earlier work stockplot or ggplot demo is very interesting. Especially a brief look at
stockplot
gives you an impression quickly of his approach.Afaik, RApache is used and the nice frontend GUI is created with
EXTJS
. I think the documentation can explain the approach much better than I do.I think R on a webserver – particularly for intranet use is a good solution (depending on the size of your company), because:
knitr
orsweave
In this question I just come around R shiny:
http://www.rstudio.com/shiny/
There is the RExcel tool that incorporates R as an Excel plugin so the main interface is Excel with R doing the computations in the background. You could set up a sheet so that the user enters their data, then highlights a box and then chooses a menu item or clicks a button and the results are placed in another cell (or set of cells). Note however, that RExcel and the comunication program it user are not free.
Another option is to create your own gui function in R, then have that gui run automatically when you start R (see ?STARTUP) and set this up on the users machine. I have done this for clients before that did not know anything about R, they just double clicked on the icon on the desktop (windows), minimized the main R window when it opened, interacted with the gui that I had programmed to run (I used tcltk, but there are others) and saw the output provided.
You can get data copied from Excel by having the user select the data and click on copy, then in your program run
newdata <- read.delim('clipboard')
and the data will be in the data frame called 'newdata', you can usewrite.table(outdata, file='clipboard', delim='\t')
to put the data from data frame 'outdata' onto the clipboard and the user can then paste it into Excel (or other programs).There is also the Rcmdr package which provides a general GUI for R (basic tools) but also has a mechanism where you can create your own menus and dialog boxes for use with the GUI.