How to install older version of cmdstanr

I would like to install cmdstanr on R running on Rstudio. I would like to install an older version of cmdstanr (cmdstanr_0.5.3) for compatibility with the stan code I have written previously. How can I install an older version of cmdstanr?

  • Operating System: MacOS 12.2.1
  • R Version: 4.2.0
  • Rstudio Version: 2023.06.1

The cmdstanr version isn’t relevant for compatibility with older Stan syntax, cmdstanr is just an interface for cmdstan. You can install and use an older version of cmdstan using the version = ... argument in install_cmdstan()

For example:

cmdstanr::install_cmdstan(version = "2.33.1")

See the documentation for install_cmdstan() for more details

2 Likes

@andrjohns Thank you very much for your prompt and accurate advice! Now I can compile and perform sampling with the code written in the older Stan syntax.
I installed version 2.32.1 of cmdstan because it seems that the older syntax is not available after version 2.33 of cmdstan.

Once again, my sincere thanks for your accurate support!