Easing access to R using 'shiny' to create graphical user interfaces:
An example for the R package 'Luminescence'
« Working with the command-line interface (CLI) of R can be tedious at best and overwhelming at worst. »
« For users with little or no experience with command-lines (CLI) a graphical user interface (GUI) offers intuitive access that counteracts the perceived steep learning curve of a CLI »
Creating a plot: a common task in R
Consider the following situation: You, as a scientist, are facing the task
to visualise your data in a more complex chart using R. Let us further
assume that someone else already provided a custom R function that
produces this kind of non-standard plot (here:
The desired plot may look like the one below.
This is a non-exhaustive collection of input widgets available in the
shiny framework. Most of the widgets here are bound to a parameter of the
plot on the right-hand side. Feel free to test them all and observe its effect
on the plot. You can also check the R console output to see the
value returned by each widget.
« Sharing shiny applications is simple! »
« R allows the creation of complex and transparent data analysis routines for experimental protocols that are not available in existing software. »
For routine luminescence dating applications the commonly used [measurement devices] are bundled with analysis software, such as Viewer or Analyst. These software solutions are appropriate for most of the regular dating and publication jobs, and enable assessment of luminescence characteristics and provide basic statistical data treatment. However, for further statistical analysis and data treatments, this software may reach its limits. In such cases, open programming languages are a more appropriate approach.
A potpourri of functions
Since its release in 2012 the functionality of the R package
Luminescence drastically increased.
What started with a handful of functions to apply a very specific type of signal
analysis and to plot the data is now a collection of >100 functions for all sorts
of (non-)specialised tasks.
Current content of
It is generally hard to measure and keep track of the distribution and reception of
the R package
RLumShiny). The official CRAN download statistics,
however, may provide at least some indication on how many and where people are using
our package. The data you see on the right-hand side are generated from the raw CRAN logs.
The general motivations have already been outlined in the introduction.
In short, using the R command-line can be tedious, even if your
experienced in R. If you are new to R and only want to quickly
produce a plot, the initial experience can be overwhelming.
In the context of the R package
Luminescence over the time we learned
that many colleagues were struggling
to get started with the package. While writing tutorials and manuals helped
to ease the access to the package, it still takes a certain amount of dedication
to learn the basic functionality of the package. Quite understandably many colleagues
do not feel like having to learn basic R programming first only to use a very small
subset of functions provided by the package. By providing a GUI to at least some
of the more basic and/or 'popular' functions of the
we can are able to practically remove these restrictions and make both R and
Luminescence more accessible to our colleagues.
jscolorInput(inputId, label, value, position = 'bottom',
color = 'transparent', mode = 'HSV', slider = TRUE, close = FALSE) The
jscolor (http://jscolor.com/) along with a function to
popover(title, content, header = NULL, html = TRUE,
class = 'btn btn-default', placement = c('right', 'top', 'left',
'bottom'), trigger = c('click', 'hover', 'focus', 'manual')) Create a bootstrap button with popover, i.e. a small overlays of content for housing secondary information.
tooltip(refId, text, attr = NULL, animation = TRUE, delay = 100, html = TRUE, placement = 'auto', trigger = 'hover') Create bootstrap tooltips for any HTML element to be used in shiny applications.