Getting started with CmdStanR

Hi there,

I am new to CmdStan. I followed the instructions for installation here:
in 1 CmdStan Installation | CmdStan User’s Guide.
However I had trouble following this and found this blog much easier to follow:
Installing CmdStanR on Windows - Max's Blog

I then moved on to the ‘Getting started with CmdStanR’ vignette. I was able to follow and replicate the output on this page until the section ‘Running MCMC’.

Specifically, when I run this line:
fit ← mod$sample( data = data_list, seed = 123, chains = 4, parallel_chains = 4, refresh = 500 )

I get the following error:
Error in processx::run(command = stanc_cmd(), args = c(stan_file, “–info”, :
argument 6 matches multiple formal arguments

I was hoping someone would be able to point me in the right direction for finding a solution to this error. I’m not sure if it is related to the installation of all the things prior or if it’s related to something not being on the right PATH or something else.

  • Operating System: Windows 10
  • CmdStan Version: “2.27.0”
  • Compiler/Toolkit: RTools 4.0 (g++ 8.3.0)

Thanks in advance for any advice

Hi, can you make sure you are using the latest version by running:


and then try again? Thanks!

Thanks but I just installed it today. Trying again I get the following message:
Skipping install of ‘cmdstanr’ from a github remote, the SHA1 (ea5bc44c) has not changed since last install.
Use force = TRUE to force installation

@rok_cesnovar As an update, this only seems to be an issue when I am using R.
If I use the same bernoulli example and sample via the command prompt I don’t get this error. But I would like to be able to use R if you happened to have any more suggestions.

I have now updated cmdstanr to version 2.28.0