EARL Conference.

Ashley Baldry

Senior Data Scientist, Acuity Analytics

Shiny, but Make It Reproducible

Reproducibility in Shiny is often harder than it should be. While static documents like Quarto make it simple to show the exact code behind an output, Shiny apps introduce reactive expressions, dynamic inputs, and user‑driven state. These features make it difficult to extract and share the code that produced what you see on screen. When debugging, collaborating, or documenting behaviour, developers often end up manually rebuilding minimal examples, replacing reactive dependencies, or untangling reactivity by hand.shinyreprex is a new package designed to solve this problem. It provides a single, focused tool: reprex_reactive().

This function converts any reactive expression into a standalone script that can be run outside the application. By capturing the logic behind a reactive output and substituting user‑controlled dependencies with their current values, shinyreprex produces a clean, minimal, and reproducible code snippet that faithfully recreates the same result.

Whether you’re maintaining large Shiny apps, onboarding new developers, or simply trying to make reactive logic more transparent, shinyreprex helps bridge the gap between interactive applications and reproducible, shareable scripts.In this talk, I’ll demonstrate:- how shinyreprex works- how it integrates naturally with Shiny idioms like bindEvent()- the workflow it enables for debugging, teaching, and team communication, and- highlight several best practices the package reinforces.

Attendees will leave with practical examples and patterns they can apply immediately in their own Shiny development.