Stan Logo

CmdStanR is a lightweight interface to Stan for R users (see CmdStanPy for Python).

To get started see the vignette Getting started with CmdStanR.


  • A clean interface to Stan services so that CmdStanR can keep up with Stan releases.

  • Minimal dependencies:
    • depend on few other R packages
    • R code doesn’t interface directly with c++, only calls compiled executables
  • Modularity: CmdStanR runs Stan’s algorithms and lets downstream modules do the analysis.

  • More flexible license: CmdStanR uses the BSD-3 license rather than the GPL-3 license required for RStan.


CmdStanR is not released yet, but will eventually be released as the cmdstanr R package. Currently you can install the development version from GitHub, but expect frequent changes until an official release.

# install.packages("devtools")
# devtools::install_github("jgabry/posterior")


There is a lot of work still to be done and contributions are very welcome! If you are interested in contributing please comment on an open issue or open a new one if none are applicable.


CmdStanR, like CmdStan and the core Stan C++ code, is licensed under new BSD. See the file.