I want to create an R application that includes a user interface where the user inputs values etc and then can run R calculations and get results back on the user interface. I was hoping that an easy to use GUI package exists. Can anyone point me to such an easy to use package to create GUIs for R? Thanks in advance for any help. Lion Bernard McGarvey Director, Fort Myers Beach Lions Foundation, Inc. Retired (Lilly Engineering Fellow).
User Interfaces for R
5 messages · Bernard McGarvey, Eric Berger, Ivan Krylov +1 more
Shiny (from RStudio - and free) A wonderful tool. And the app is accessed via the user's browser. On Thu, Jan 10, 2019 at 4:18 PM Bernard McGarvey <
mcgarvey.bernard at comcast.net> wrote:
I want to create an R application that includes a user interface where the
user inputs values etc and then can run R calculations and get results back
on the user interface. I was hoping that an easy to use GUI package exists.
Can anyone point me to such an easy to use package to create GUIs for R?
Thanks in advance for any help.
Lion Bernard McGarvey
Director, Fort Myers Beach Lions Foundation, Inc.
Retired (Lilly Engineering Fellow).
[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
On Wed, 9 Jan 2019 14:29:22 -0500 (EST)
Bernard McGarvey <mcgarvey.bernard at comcast.net> wrote:
Can anyone point me to such an easy to use package to create GUIs for R?
If you want a traditional approach, a lot of R installations have
Tcl/Tk support built in (i.e. capabilities('tcltk') is TRUE). This
means that you can run library(tcltk) and call Tk functions to display
interactive windows almost everywhere.
This toolkit requires some knowledge of Tk [*] and may not look
particularly nice on some platforms, but is probably already included
in most R installations and has low resource footprint. There is a set
of slides [**] that might help you start using Tk, its widgets and
geometry managers.
R commander (Rcmdr, [***]) package has been developed using Tk.
The book Programming Graphical User Interfaces in R by Michael
Lawrence and John Verzani (ISBN 9781439856826) describes the major R
packages for GUI programming: RGtk2, qtbase, Tcl/Tk, and gWidgets.
Best regards, Ivan [*] https://www.tcl.tk/man/tcl8.6/TkCmd/contents.htm [**] https://uwaterloo.ca/statistics-and-actuarial-science/sites/ca.statistics-and-actuarial-science/files/uploads/files/rtcltk_tcl.pdf https://uwaterloo.ca/statistics-and-actuarial-science/sites/ca.statistics-and-actuarial-science/files/uploads/files/rtcltk_geometry.pdf [***] https://rcommander.com/
On 10/01/2019 4:25 p.m., Ivan Krylov wrote:
On Wed, 9 Jan 2019 14:29:22 -0500 (EST) Bernard McGarvey <mcgarvey.bernard at comcast.net> wrote:
Can anyone point me to such an easy to use package to create GUIs for R?
If you want a traditional approach, a lot of R installations have
Tcl/Tk support built in (i.e. capabilities('tcltk') is TRUE). This
means that you can run library(tcltk) and call Tk functions to display
interactive windows almost everywhere.
This toolkit requires some knowledge of Tk [*] and may not look
particularly nice on some platforms, but is probably already included
in most R installations and has low resource footprint. There is a set
of slides [**] that might help you start using Tk, its widgets and
geometry managers.
R commander (Rcmdr, [***]) package has been developed using Tk.
The book Programming Graphical User Interfaces in R by Michael
Lawrence and John Verzani (ISBN 9781439856826) describes the major R
packages for GUI programming: RGtk2, qtbase, Tcl/Tk, and gWidgets.
That book was published in 2012, and things have moved on since then. Eric's suggestion of Shiny is newer, and is a really well-designed system. A fairly steep learning curve, but worth it. Duncan Murdoch
On Thu, 10 Jan 2019 19:25:30 -0500
Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
Eric's suggestion of Shiny is newer, and is a really well-designed system. A fairly steep learning curve, but worth it.
I understand the need for progress and I really like Shiny's API - it feels very declarative and easy to write, and I don't care about the presentation as long as it gets the job done - but all things have their use cases, which is why I waited a bit before suggesting tcltk and emphasised its low resource footprint and portability. For example, an undergraduate student I work with has a laptop with just 2 gigabytes of RAM. Now, of course there is a lot you can do in R with that amount of memory - I had to make do with less until late 2016 - but the moment he launches a browser, it pages everything else out. For him, using Shiny would be extremely slow if not impossible to use. This is something browsers should be fixing and not the fault of Shiny, but I can't ignore it either way. (And 2G is not the limit: the renderer process of browser-based[*] Skype client has somehow managed to allocate 5G of memory on the machine I'm typing this message on.) Also, personally, I would prefer not to launch an asynchronous web server and transfer large files from my computer back to my computer (but into /tmp)[**] for something as simple as what could be accomplished with tcltk::tk_choose.files(). But those issues (and things like requiring an Internet connection to render TeX-style math[***]) aside, Shiny is really a fine and modern user interface package, and should be preferred if you have the resources. Feel free to stop me if you think I'm engaging in off-topic here.
Best regards, Ivan [*] https://electronjs.org/apps/skype: "Electron accomplishes [building cross-platform desktop applications with HTML, CSS, and JavaScript] by combining Chromium and Node.js into a single runtime" [**] https://shiny.rstudio.com/reference/shiny/latest/fileInput.html: "The path to a temp file that contains the data that was uploaded." [***] https://rdrr.io/cran/shiny/src/R/shinyui.R#sym-withMathJax: does MathJax license require referencing https://mathjax.rstudio.com instead of bundling it together with Shiny, like the rest of JavaScript libraries are?