Stan development in RStudio

Check this out! RStudio now has special features for Stan:

– Improved, context-aware autocompletion for Stan files and chunks

– A document outline, which allows for easy navigation between Stan code blocks

– Inline diagnostics, which help to find issues while you develop your Stan model

– The ability to interrupt Stan parallel workers launched within the IDE

This is awesome—especially that last feature. Rstudio is my hero.

And don’t forget this: If you don’t currently have Stan on your computer, you can play with this demo version on the web, thanks to RStudio Cloud.

11 thoughts on “Stan development in RStudio

  1. This is very cool. One perhaps unrelated question: when I run my Stan models in an Rmd file within RStudio, my process manager shows four R processes running. This is probably the four chains running in parallel on my Macbook Pro, which has four cores. But sometimes I run an Rmd file from the command line using Rscript. Then I see only one R process running. I assume this means that the chains are not running in parallel—is this correct? If so, how to make that happen? I obviously set the rstan options so the number of cores is identified:

    options(mc.cores = parallel::detectCores()).

  2. The only issue is that even simple Stan models with a couple of thousand of observations seems to run out of Ram when using RStudio cloud. Can’t complain because it’s a free service. But still, it does prevent a barrier to using the service for people like me with big-ish data sets.

    • Anon:

      I think there is, or will be, a pay version of RStudio Cloud without such restrictions. But, yes, the purpose of the free online version is to be able to play around with Stan and see how it works, not as a workhorse.

Leave a Reply to Shravan Cancel reply

Your email address will not be published. Required fields are marked *