DEV Community

loading...

Launch Shiny App Without Blocking the Session

martinmodrak profile image Martin Modrák Originally published at martinmodrak.cz on ・1 min read

This is a neat trick I found on Tyler Morgan-Wall’s Twitter and is originally attributed to Joe Cheng. You can run any Shiny app without blocking the session. 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
  )
}
Enter fullscreen mode Exit fullscreen mode

Hope that helps!

Discussion (0)

pic
Editor guide