RKWard – a cross-platform graphical user interface and development environment for R
dipl.-psych. thomas friedrichsmeier ruhr university bochum dipl.-psych. m.eik michalke heinrich heine university düsseldorf
11.III.2015 GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev GUIs for R summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | GUIs for R
GUIs for R
RKWard JSS special volume 49: dialogs »graphical user interfaces for R« console/editor data plots packages
JSS Journal of Statistical Software JSS Journal of Statistical Software extendable June 2012, Volume 49, Issue 1. http://www.jstatsoft.org/ June 2012, Volume 49, Issue 9. http://www.jstatsoft.org/ plugin concept rkwarddev Graphical User Interfaces for R RKWard: A Comprehensive Graphical User Interface and Integrated Development Environment Pedro M. Valero-Mora Rub´enD. Ledesma for Statistical Analysis with R summary Universitat de Val`encia Universidad Nacional de Mar del Plata Stefan R¨odiger Thomas Friedrichsmeier Abstract Charit´e-Universit¨atsmedizin Berlin Ruhr-University Bochum Since R was first launched, it has managed to gain the support of an ever-increasing percentage of academic and professional statisticians. However, the spread of its use Prasenjit Kapat Meik Michalke thx among novice and occasional users of statistics have not progressed at the same pace, which The Ohio State University Heinrich Heine University Dusseldorf¨ can be atributed partially to the lack of a graphical user interface (GUI). Nevertheless, this situation has changed in the last years and there is currently several projects that have added GUIs to R. This article discusses briefly the history of GUIs for data analysis and then introduces the papers submitted to an special issue of the Journal of Statistical Abstract Software on GUIs for R. R is a free open-source implementation of the S statistical computing language and Keywords: GUI, statistical software, R. programming environment. The current status of R is a command line driven interface with no advanced cross-platform graphical user interface (GUI), but it includes tools for building such. Over the past years, proprietary and non-proprietary GUI solutions have emerged, based on internal or external tool kits, with different scopes and technological concepts. For example, Rgui.exe and Rgui.app have become the de facto GUI on the Microsoft Windows and Mac OS X platforms, respectively, for most users. In this paper 1. Introduction we discuss RKWard which aims to be both a comprehensive GUI and an integrated devel- opment environment for R. RKWard is based on the KDE software libraries. Statistical Nowadays, graphical user interfaces (GUIs) are the most common way of interacting with procedures and plots are implemented using an extendable plugin architecture based on a computer or other electronic devices. Whereas they are arguably not the best way of ECMAScript (JavaScript), R, and XML. RKWard provides an excellent tool to manage different types of data objects; even allowing for seamless editing of certain types. The performing every conceivable job, its dominance has reached the principal operative systems, objective of RKWard is to provide a portable and extensible R interface for both basic application domains, and tasks. Measured it in purely statistical terms, the triumph of this and advanced statistical and graphical analysis, while not compromising on flexibility and style of interaction is unquestionable and it seems clear that it will remain very popular in modularity of the R programming environment itself. the foreseeable future. However, regarding the discipline of statistics, this supremacy does not seem so dramatically Keywords: GUI, integrated development environment, plugin, R. clear, as many of the people working in this field seem to favor that using a typed language via a command line interface (CLI) is a much more productive, accurate and reproducible way of performing their tasks than a GUI. Actually, we are positive that they are right, because writing up commands can be undoubtedly much more productive than using a GUI, as far as 1. Background and motivation the learning cost is not included in the bill. Thus, although getting the knowledge to manage a command-based language is within reason if you are going to use it very often, the novice In mid 1993 Ihaka and Gentleman published initial efforts on the computing language and and occasional users of statistical software may not ever see sufficient returns to justify the programming environment R on the s-news mailing list. Ambitions for this project were to
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx RKWard
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | about
GUIs for R RKWard I combines GUI and IDE dialogs console/editor B to satisfy both newbies and gurus data plots B easy to extend packages I mere desktop application extendable plugin concept B no server, but R backend configurable rkwarddev I multi-platform summary B MS Windows thx B OS X B GNU/Linux
I free software (GPL v2+) I download: http://rkward.kde.org
B part of the KDE family B 47 official releases since 2002
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx main window
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | main window RKWard | main window: workspace browser RKWard | main window: file browser RKWard | main window: R console RKWard | main window: debugger RKWard | main window: online help RKWard | main window: results in HTML GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx dialogs
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | dialog windows
GUIs for R
RKWard dialogs data analysis plots console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | dialogs: power analysis
GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | dialogs: mandatory fields
GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | dialogs: code
GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | dialogs: wizard
GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | dialoge: online help GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx R console & code editor
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | R console & code editor
GUIs for R
RKWard dialogs console/editor data plots packages extendable I syntax highlighting plugin concept rkwarddev I code hinting summary I code folding thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx working with data import/edit/export
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | data import/export
GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | import SPSS files
GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | data.frame editor RKWard | export CSV files
GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx plots preview, history & export
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | plot preview, history & export
GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | export to TikZ format (LATEX) GUIs for R
RKWard Sales development 2003-2009 dialogs console/editor Illegal downloads (tracks) 600 data CD sales (albums) plots Payed downloads (tracks) CD sales (singles)
packages 500 Payed downloads (bundles) extendable
plugin concept 400 rkwarddev
summary 300 thx 200 Sales/downloads in millions 100 0
2003 2004 2005 2006 2007 2008 2009
Data: Financial reports Bundesverband Musikindustrie, 2004-2009
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx package management
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | R packages: installed locally
GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx plugin concept
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | the plugin concept
GUIs for R
RKWard dialogs console/editor data plots packages extendable I dialogs are implemented as plugins plugin concept rkwarddev I you can extend RKWard with your own plugins summary B can be installed as R packages thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | R packages: RKWard plugins
GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | plugins: XML & JavaScript
GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | example: radio button
GUIs for R RKWard radio button: define GUI in XML dialogs console/editor
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | example: radio button
GUIs for R
RKWard dialogs radio button: generate R code with JavaScript console/editor var hypothesis = getValue("hypothesis"); data var x = getValue("x"); plots var y = getValue("y"); packages echo("result <- t.test (x="+x+ ", y=" + y); extendable echo(", alternative=\"" + hypothesis +"\"\n"); plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx rkwarddev
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | rkwarddev: documentation
GUIs for R RKWard how-to as vignette in the package dialogs console/editor data plots
2 Before we start
It is important to understand that while rkwarddev can help you to make designing new plugins much easier, you still need to know how the generated XML and JavaScript files work and interact. That is, if you didn’t yet read the Introduction to Writing Plugins for RKWard,1 please do so before you start working with this package. Once you’re sure you understand how plugins in RKWard actually work, just come back here. Not bad for less than 20 short lines of code. This makes dialog design both very efficient and flexible: Imagine you want to re-arrange the order of elements, or exper- 1http://rkward.sourceforge.net/documents/devel/plugins/index.html iment with completely different tabbook layouts, all you need to do is to change the
1 7
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | XML with rkwarddev
GUIs for R
RKWard dialogs console/editor data functions for XML & JavaScript plots > hypo <- rk.XML.radio(label="using test hypothesis", id.name="hypothesis", packages + options=list( extendable + "Two-sided"=c(val="two.sided"), + "First is greater"=c(val="greater"), plugin concept + "Second is greater"=c(val="less") rkwarddev + ) summary + ) > hypo thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | rkwarddev: start scripting with a GUI
GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org GUIs for R
RKWard dialogs console/editor data plots packages extendable plugin concept rkwarddev summary thx take home message
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org RKWard | summary
GUIs for R
RKWard dialogs console/editor I multi-platform GUI and IDE for R data plots import/edit/export data packages I extendable B dialogs for common statistics & graphs plugin concept rkwarddev I functionality easy to extend summary B XML/JavaScript, rkwarddev thx I excellent for teaching stats
B and package development
I download: http://rkward.kde.org
I feedback: [email protected]
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org GUIs for R thx! RKWard dialogs console/editor questions? ideas? comments? data plots
t· friedrichsmeier & m· michalke | RUB · HHU | http://rkward.kde.org