Hi R, I have a an excel file with a lot of data. I need to create an user interface in R, which has one single screen. It needs to contain a right pane containing the click buttons for different countries (say). If the user clicks a country, then a chart needs to be created for that country, taking the data from Excel. Is this possible and which package helps me in doing this? Many thanks in advance. Thanks and Regards, Shubha Karanth This e-mail may contain confidential and/or privileged i...{{dropped:13}}
RExcel on Windows is designed for this task. See rcom.univie.ac.at for examples including a video. While you can download the RExcelInstaller package from CRAN, we recommend installing R with RExcel and other packages it needs with the RAndFriends installer available on the download page at rcom.univie.ac.at. Richard Heiberger On Thu, Jun 17, 2010 at 11:44 AM, Shubha Vishwanath Karanth < shubhak@ambaresearch.com> wrote:> Hi R, > > > > I have a an excel file with a lot of data. I need to create an user > interface in R, which has one single screen. It needs to contain a right > pane containing the click buttons for different countries (say). If the > user clicks a country, then a chart needs to be created for that > country, taking the data from Excel. Is this possible and which package > helps me in doing this? Many thanks in advance. > > > > Thanks and Regards, > > Shubha Karanth > > > > This e-mail may contain confidential and/or privileged i...{{dropped:13}} > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Shubha Vishwanath Karanth <shubhak <at> ambaresearch.com> writes:> > Hi R, > > I have a an excel file with a lot of data. I need to create an user > interface in R, which has one single screen. It needs to contain a right > pane containing the click buttons for different countries (say). If the > user clicks a country, then a chart needs to be created for that > country, taking the data from Excel. Is this possible and which package > helps me in doing this? Many thanks in advance. > > Thanks and Regards, >If you don't mind installing the GTK libraries, then the traitr package can be used here without too much difficulty. Here is what you can do for your request (a stripped down version of a demo in the vignette) ## sample data, replace me d <- data.frame(country=c("US","US","Canada","Mexico"), x = rnorm(1:4), y = rnorm(1:4)) library(traitr) library(gWidgets) ## also gWidgetsRGtk2, cairoDevice options(guiToolkit="RGtk2") countries <- unique(d$country) dlg <- aDialog(items=list( output=graphicDeviceItem(), countryFilter=choiceItem(value=countries, values=countries, multiple=TRUE, show_label=FALSE) ), help_string="Use filter to narrow", ## this is called when the countryFilter checkbox is clicked property_countryFilter_value_changed=function(.,...) .$make_plot(), ## this draws the plot make_plot=function(.) { countries <- .$get_countryFilter() ## adapt this: plot(y ~ x, data=d, subset=country %in% countries) }) view <- aPanedGroup(aContainer("output"), aFrame(label="Filter by:", aFrame("countryFilter", label="Country")), horizontal=TRUE ) dlg$make_gui(gui_layout=view) dlg$make_plot()> Shubha Karanth > > This e-mail may contain confidential and/or privileged i...{{dropped:13}} > >
One possibility (there are others as well) is write your own function that given the name of the country will grab the data and create the plot that you want. Then use the tkexamp function in the TeachingDemos package to create the GUI for this function. Other options (which I am less familiar with) could include the fgui package, the playwith package, and the rpanel package. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Shubha Vishwanath Karanth > Sent: Thursday, June 17, 2010 9:45 AM > To: r-help at stat.math.ethz.ch > Subject: [R] R user interface > > Hi R, > > > > I have a an excel file with a lot of data. I need to create an user > interface in R, which has one single screen. It needs to contain a > right > pane containing the click buttons for different countries (say). If the > user clicks a country, then a chart needs to be created for that > country, taking the data from Excel. Is this possible and which package > helps me in doing this? Many thanks in advance. > > > > Thanks and Regards, > > Shubha Karanth > > > > This e-mail may contain confidential and/or privileged > i...{{dropped:13}} > > ______________________________________________ > R-help at r-project.org 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.