R user interface

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

R user interface

Shubha Vishwanath Karanth
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}}

______________________________________________
[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: R user interface

Richard M. Heiberger
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 <
[hidden email]> 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}}
>
> ______________________________________________
> [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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[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: R user interface

jverzaniNWBKZ
In reply to this post by Shubha Vishwanath Karanth
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}}
>
>

______________________________________________
[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: R user interface

Greg Snow-2
In reply to this post by Shubha Vishwanath Karanth
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
[hidden email]
801.408.8111


> -----Original Message-----
> From: [hidden email] [mailto:r-help-bounces@r-
> project.org] On Behalf Of Shubha Vishwanath Karanth
> Sent: Thursday, June 17, 2010 9:45 AM
> To: [hidden email]
> 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}}
>
> ______________________________________________
> [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.