Skip to content

Visualizing your fitted Stan model using ShinyStan without interfering with your Rstudio session

ShinyStan is great, but I don’t always use it because when you call it from R, it freezes up your R session until you close the ShinyStan window.

But it turns out that it doesn’t have to be that way. Imad explains:

You can open up a new session via the RStudio menu bar (Session >> New Session), which should have the same working directory as wherever you were prior to running launch_shinystan(). This will let you work on whatever you need to work on while simultaneously running ShinyStan (albeit via two RStudio sessions).

OK, good to know.

One Comment

  1. Shosh says:

    Worth noting – you might still want to have your fitted model available in your new session (rather than having to refit it), in which case you should save your model (or session data) in an rData file before running shinystan (and load it into your new session).

Leave a Reply