R GUI using traitr to display multiple data

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

R GUI using traitr to display multiple data

Amitoj S. Chopra
Hello to everyone.

I am constructing a GUI table using traitr with multiple buttons that respond to different codes. Such as I am doing titration of a protein, and I want the script to run and then the end to be displayed in a window. The window will have a button for data and graphs, where when you click on the data button the data will be displayed and when you click on the graph button the graphs will be displayed. Do you know how to set up different buttons with functions using the traitr GUI for R? Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: R GUI using traitr to display multiple data

jverzaniNWBKZ
Amitoj S. Chopra <amitojc <at> gmail.com> writes:

>
>
> Hello to everyone.
>
> I am constructing a GUI table using traitr with multiple buttons that
> respond to different codes. Such as I am doing titration of a protein, and I
> want the script to run and then the end to be displayed in a window. The
> window will have a button for data and graphs, where when you click on the
> data button the data will be displayed and when you click on the graph
> button the graphs will be displayed. Do you know how to set up different
> buttons with functions using the traitr GUI for R? Thanks!

There are two ways. You can use a buttonItem or to add a button to a dialog,
just use the buttons property and define a handler. Here are both in an example:


dlg <- aDialog(items=list(a = buttonItem("click me", show_label=FALSE,
                            action=function(.,...) print("clicked"))
                 ),
               buttons=c("OK","Cancel","Help","Some other"),
               Someother_handler=function(.) print("some other button"))
dlg$make_gui()

______________________________________________
[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.