2020 Oct: Flexdashboard debugging with shinyobjects

Shiny applications and dashboards help communicate analytics insights to both technical and non-technical audiences in an interactive and efficient way. However, debugging them is not an easy process. For 2020 October virtual meetup, 30+ data enthusiastics joined the interactive workshop led by R-Ladies Philly member Jake Riley. Jake elucidated aspects of the popular dashboard building package flexdashboard and demonstrated his recently published tool shinyobjects to debug.

flexdashboard and reactivity

flexdashboard leverages Rmarkdown and shiny to build a dashboard or shiny application. Instead of splitting ui and server functions, flexdashboard takes the advantage of interpretability from Rmarkdown and makes shiny code cleaner and easier to read.

Like shiny, flexdashboard used the reactive programming model which involves user inputs and dynamic data/plots/titles. It can get really complicated when you have a cascade of reactive variables. It also increases the difficulty at the debugging step.

shinyobjects workflow

To troubleshoot reactive data, Jake developed shinyobjects. This R package can access reactive objects in your local environment and allow debugging R code without actually running the app. It will save you time and allow you to iterate more quickly.

The package includes 4 components at the workflow

  • view_ui() to see what UI components look like without running the app
  • load_reactive_objects() to convert reactive objects to static functions
  • create a dummy input list object for users to prepopulate
  • convert_selection() to convert code highlighted in source pane

To learn more, please read the detailed vignette and tips and tricks.s

Check it Out

Thank you

Thank you to all our attendees, our sponsors (R-ladies Global), and especially our great presenter Jake Riley!!

This post was authored by Chun Su. For more information contact

Related