useR

Tutorial: Web 2.0 interfaces for R with Tiki


Xavier de Pedro, Vall d'Hebron Research Institute (VHIR)

Overview

It's easy to find people with intermediate level in the use of R, which talk about their code in blogs or other websites, but they usually do not know how to create a dynamic web interface to their programs in R so that their potential users can test their application directly online. There are some tools to create simple html reports from R (R2HTML, HTMLReport, among others), but they frequently do not allow users to change parameters and re- generate these graphs, tables or reports with new data chosen by the user through of the website itself. And those recent packages that allow to create web interfaces, such as CGIwithR or Shiny, they are not designed to allow custom usage of Web 2.0 features in their interfaces, to collect discussion in associated forums, promote an easy documentation based on wiki or wysiwyg pages from its users, beyond the R community of package developers, etc. Some other approaches involve complex setups server side (Bergsma & Smith 2012) that might be suited for another target population with more knowledge on server administration. In recent user meetings such as R-es'2011, UseR!2011, or R-es'2012, we could find that many users have knowledge gaps regarding Apache, PHP, MySQL (for example), and powerful web programs that can be installed easily and run in them, using FLOSS tools already mature and at no extra cost than the web server access (De Pedro 2012, De Pedro & Sanchez 2010, 2011).

Goals

In this workshop attendees will get an overview of everything needed to create web interfaces to their programs in R using some free/libre open source software (FLOSS) tools. This way, at the end of the workshop they will have seen and eventually learned:

We plan to use an ad-hoc "Live USB disk" with everything needed to follow the workshop: GNU/Linux, Apache Web server, PHP Programing Language, Mysql Database engine, Tiki, and R trunk (updatable both of them by means of subversion) in case any person needs the latest version of R (or eventually Tiki) for their package, tests, etc.

Outline

Prerequisites

Intended Audience

Anyone interested to learn how to create simple (yet powerful) web interfaces easily to run R scripts server side in real time, while keeping server safety under control. Even more interested potentially will be those willing to create communities around their web applications (running R in the backend), and designing effective mechanisms to collect feedback from their users and enhance the interaction, discussion, documentation from the community around your R package.

Workshop Materials

Related Links

Bergsma, T. T. and Smith, M.S. (2012). Sumo: An Authenticating Web Application with an Embedded R Session. RJournal Volume 4/1, June. http://journal.r-project.org/archive/2012-1/RJournal_2012-1_Bergsma+Smith.pdf

De Pedro, X. (2012). 2h Workshop 'Interfaces Web 2.0 para R con Tiki'. II Jornadas de Usuarios de R. Comunidad R-Hispano. Barcelona, Spain. http://r-es.org/IV+Jornadas

De Pedro, X.; Sánchez, A. (2011). Web 2.0 for R scripts & workflows: Tiki & PluginR. The R User Conference 2011. Coventry, UK. Presentation

De Pedro, X.; Sánchez, A. (2010). Usando de forma segura R vía web con Tiki. II Jornadas (I Congreso) de Usuarios de R. Mieres, Oviedo, Spain. http://r-es.org/II+Jornadas - Full Text (Spanish)

CGIwithR: http://www.omegahat.org/CGIwithR/

Live USB Disk (LAMPP+R+Rstudio+Tiki): http://ueb.vhir.org/Live+USB+Linux#Precise_Puppy

PluginR Documentation: https://doc.tiki.org/PluginR

Shiny: http://www.rstudio.com/shiny/

Tiki Wiki CMS / Groupware: https://tiki.org