BLACK LIVES MATTER
Join us and donate
The premier IDE for R
RStudio anywhere using a web browser
Put Shiny applications online
Shiny, R Markdown, Tidyverse and more
Do, share, teach and learn data science
Let us host your Shiny applications
The premier software bundle for data science teams
RStudio for the Enterprise
Connect data scientists with decision makers
Control and distribute packages
Shiny's Holy Grail: Interactivity with reproducibility - useR! 2019 Toulouse
July 11, 2019
Since its introduction in 2012, Shiny has become a mainstay of the R ecosystem, providing a solid foundation for building interactive artifacts of all kinds. But that interactivity has always come at a significant cost to reproducibility, as actions performed in a Shiny app are not easily captured for later analysis and replication. In 2016, Shiny gained a "bookmarkable state" feature that makes it possible to snapshot and restore application state via URL. But this feature, though useful, doesn't completely solve the reproducibility problem, as the actual program logic is still locked behind a user interface.
The solution that Shiny app authors have long requested is a way for users of their apps to explore interactively, and then generate a reproducible artifact—like a standalone R script or R Markdown document—that represents a snapshot of the app’s state and logic. Such a script can then be rerun, studied, modified, checked into source control—all the things one cannot do with an interactive app. Such script-generating Shiny apps do exist today, but it is generally thanks to heroic efforts on the part of their authors; the level of implementation effort is high, and the Shiny app logic tends to be fragile and/or involve significant duplication of code.
In this talk, I'll discuss some of the approaches that app authors have taken to achieve these ends, along with some surprising and exciting approaches that have recently emerged. These new approaches usefully decrease the implementation effort and code duplication, and may eventually become essential tools for those who wish to combine interactivity with reproducibility.
Joe Cheng is the Chief Technology Officer at RStudio and was the original creator of the Shiny web framework, and continues to work on packages at the intersection of R and the web.