A Graphical User Interface for the R Package ’Luminescence’

A Graphical User Interface for the R Package ’Luminescence’

Burow et al., Ancient TL, Vol. 34, No. 2, 2016 RLumShiny - A graphical user interface for the R Package ’Luminescence’ Christoph Burow1∗, Sebastian Kreutzer2, Michael Dietze3, Margret C. Fuchs4, Manfred Fischer5, Christoph Schmidt5, Helmut Bruckner¨ 1 1 Institute of Geography, University of Cologne, 50923 Cologne, Germany 2 IRAMAT-CRP2A, Universite´ Bordeaux Montaigne, Maison de l’Archeologie,´ Esplanade des Antilles, 33607 Pessac Cedex, France 3 Section 5.1 Geomorphology, GFZ German Research Centre for Geosciences, 14473 Potsdam, Germany 4 Helmholtz-Zentrum Dresden-Rossendorf, Helmholtz Institute Freiberg for Resource Technology, Freiberg, Germany 5 Geographical Institute, Geomorphology, University of Bayreuth, 95440 Bayreuth, Germany ∗Corresponding Author: [email protected] Received: November 28, 2016; in final form: December 5, 2016 Abstract (Tippmann, 2015). This may owe to R being intuitive Since the release of the R package and easy to learn, open source, and available for all major ’Luminescence’ in 2012 the functionality computer platforms. A further major advantage of R is of the package has been greatly enhanced by its easy extensibility by so-called packages, which are implementing further functions for measure- collections of pre-programmed routines and commands for ment data processing, statistical analysis and all kinds of specialised purposes. To date, there are more 1 graphical output. Along with the accompa- than 9,600 packages available through the Comprehensive 2 nying increase in complexity of the package, R Archive Network (CRAN) , contributed by users from working with the command-line interface of R various scientific fields. For the purpose of analysing can be tedious, especially for users without pre- luminescence data, Kreutzer et al.(2012) introduced the R vious experience in programming languages. package ’Luminescence’. The package provides a collection Here, we present a collection of interactive of functions to process luminescence data and includes, web applications that provide a user-friendly amongst others, routines for import and export of raw graphical user interface for the ’Luminescence’ measurement files, statistical analysis of luminescence package. These applications can be accessed curves and spectra as well as plotting equivalent dose and/or over the internet or used on a local computer age distributions. Throughout the years, the functionality of using the R package ’RLumShiny’. A short the package continuously increased, especially thanks to the installation and usage guide is accompanied by helpful suggestions and comments by the users. As the field the presentation of two exemplary applications. of applications with the latest release (version 0.6.4) is now larger than ever, the growth in functionality comes at the Keywords: R, Software, GUI, Luminescence cost of increasing complexity. The practical guide by Dietze dating, Abanico Plot, Cosmic Dose Rate et al.(2013) or the worked example of Fuchs et al.(2015) aim at maintaining the usability of the package and giving a helping hand for users new to R and the ’Luminescence’ package. In addition to tutorials dedicated to the use of 1. Introduction R for luminescence data analysis available on the official After its introduction in 1996 by Ihaka & Gentleman (1996) the programming language R (R Core Team, 2016) 1https://mran.microsoft.com/, accessed: 2016-11-18. experienced a notable rise in popularity in the mid-2000s 2https://cran.r-project.org/, accessed: 2016-11-18. 22 Burow et al., Ancient TL, Vol. 34, No. 2, 2016 website3 of the R package ’Luminesecence’ there is also a the applications are presented first. A short installation wide variety of excellent tutorials and books about R itself and usage guide of the R package ’RLumShiny’ is then (e.g., Ligges, 2008; Adler, 2012; Crawley, 2012; Wickham, followed by a presentation of two applications for creating 2014). abanico plots and calculating the cosmic dose rate. For the latter, we also provide details on the underlying function While R is a comparatively easy-to-learn programming Luminescence::calc CosmicDoseRate() itself. language, there is still a steep learning curve until a user Throughout the manuscript, R function calls and R related is able to routinely achieve the desired results. In-depth code listings are typed in monospaced letters. Functions knowledge of R fundamentals is not required when of R packages other than ’RLumShiny’ are given in the style working with the ’Luminescence’ package, but being of package::function(). R packages are given in familiar with the most important data structures in R is single quotation marks and software programs are in italics. a must. In the simplest case, for a specific task, using the package only involves a single short function call, e.g., Luminescence::plot AbanicoPlot(data = 2. Shiny applications de.data) to produce an abanico plot (Dietze et al., 2016) Even though R lacks native support for GUI functions, of equivalent dose estimates. However, users may want to its capabilities of linking it to other programming languages adjust the plot according to their requirements. While other allows to utilise external frameworks to build graphical user software products such as Origin® or SigmaPlot® allow the interfaces (Valero-Mora & Ledesma, 2012). Throughout the user to comfortably click on each element of a plot to change years there have been many attempts to provide the means its appearance, this is not possible in R. In R a plot cannot for easier access to R. A non-exhaustive list of notable R be changed after it has been drawn, and the user is required packages linking to other languages or frameworks (given in to re-run the function call with additional arguments that parentheses) for building GUIs includes: control the appearance of specific plot elements. For the Luminescence::plot AbanicoPlot() function • ’rrgobi’ (GGobi) (Temple Lang & Swayne, 2001; Tem- there are currently 33 such arguments, plus additional base ple Lang et al., 2016) R arguments that can be used to design the plot to ones desire. For more elaborate plots the function call in the R • ’gWidgets’ (Tcl/Tk, GTK+, Java or Qt) (Verzani, 2014) command-line rapidly increases in complexity. Users new to R may feel quickly overwhelmed and may hence not be able • ’cranvas’ (Qt) (Xie, 2013) to exploit the full potential of the R command-line. But even • ’RGtk’/’RGtk2’ (GTK+) (Robison-Cox, 2003; experienced users may find it tedious to iteratively run the Lawrence & Temple Lang, 2010) function until a satisfying results is produced. Considering that plotting data is also at least partly subject to personal • iPlots (Java) (Urbanek & Theus, 2003; Urbanek & aesthetic tastes in accordance with the information it is Wichtrey, 2013) supposed to convey, iterating through all the possible options in the R command-line can be a time-consuming task. In • ’tcltk’ (Tcl/Tk) (Dalgaard, 2001a,b) Human-Computer Interaction an alternative approach to the As an example, the ’tctlk’ package implements an inter- command-line interface (CLI) is the graphical user interface face to the Tcl/Tk GUI toolkit and allows the user to build (GUI), which allows direct, interactive manipulation and a Tk GUI with plain R code. The most prominent project interaction with the underlying software. For users with making full use of the Tcl/Tk framework is the R Comman- little or no experience with command-lines a GUI offers der5 (Fox, 2005, 2016), which provides a GUI to an exhaus- intuitive access that counteracts the perceived steep learning tive collection of statistical functions and is commonly used curve of a CLI (Unwin & Hofmann, 1999). in teaching statistics (e.g., Konrath et al., 2013; Wagaman, Here, we present a GUI for the R package ’Luminescence’ 2013; Westbrooke & Rohan, 2014). in the form of interactive web applications. These appli- One of the more recent attempts to provide a GUI toolkit cations can be accessed online so that a user is not even for R was the introduction of the ’shiny’ package (Chang required to have a local installation of R. The so-called shiny et al., 2016) by RStudio® in late 20126, which allows for applications provide access to most of the plotting functions building interactive web applications straight from R. Sim- of the R package ’Luminescence’ as well as to the functions ple R code allows automatic construction of HTML, CSS and for calculating the cosmic dose rate and for transforming JavaScript based user interfaces. GUIs built using ’shiny’ are CW-OSL curves (Table1). We further introduce the R often referred to as ’shiny applications’ due to the package’s package ’RLumShiny’ (Burow, 2016) that bundles all name. Prior knowledge in any of these (markup-)languages applications, is freely available through the CRAN and is not required. The application is rendered in a web browser GitHub4, and which can be installed and used in any local R environment. The general concept and basic layout of 5R Commander is distributed as the R package ’Rcmdr’ (Fox & Bouchet- Valat, 2016) 3http://www.r-luminescence.de/, accessed: 2016-11-20. 6https://cran.r-project.org/src/contrib/Archive/ 4https://github.com/, accessed: 2016-11-20. shiny/, accessed: 2016-11-18. 23 Burow et al., Ancient TL, Vol. 34, No. 2, 2016 Table 1: Shiny applications available in the R package ’RLumShiny’ (v0.1.1). Each application can be started using the function app RLum() with the corresponding keyword as input for the parameter app (e.g., app RLum(app = ’abanico’)). * All functions are part

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    11 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us