Discussion on creating reproducible analyses in Shiny



I was hoping to start an open discussion here about the best practices people have found or might suggest in creating reproducible code from a Shiny session.

At the recent R Pharma conference Joe Cheng presented some challenges within pharma as related to using Shiny. http://rinpharma.com/program/using-interactivity-responsibly-in-pharma.html

However, the problem also extends beyond pharma into any field/application where Shiny should/could be operating to produce results that may need to be reproduced.

You've presented users with many ways to modify their results. How do they report the results while allowing these results to be reproduced?

The ability to dynamically generate a standalone .r script that is ideally human-readable regular R code... but in any case a script that will reproduce the generated results.

There are workarounds like exposing the current state of all reactive variables within a "suggested reporting" paragraph.
eg image

Also, Joe gave a great example of what could be done with current functions:

This included bookmarking an app (https://github.com/jcheng5/rpharma-demo/blob/master/images/sshot2.png), and generating readable-code: (https://raw.githubusercontent.com/jcheng5/rpharma-demo/master/images/sshot1.png)

However he did state that this is likely not ideal as it would require a new paradigm in writing Shiny code using quosures. That also means this method is not backwards-compatible with already-written apps and could be a lengthy process with already-written apps whose codebase may be quite large.

I look forward to hearing everyone's experience, thoughts, and ideas!