Launching ShinyStan without blocking R session


#1

This is a neat trick I found on Tyler Morgan-Wall’s Twitter and originally attributed to Joe Cheng. You can run ShinyStan (or anything else Shiny) without blocking the session (which was always a pain point for me). My helper function to run ShinyStan without blocking is below:

launch_shinystan_nonblocking <- function(fit) {
  library(future)
  plan(multisession)
  future(
    launch_shinystan(fit) #You can replace this with any other Shiny app
  )
}

Hope that helps somebody!