Closed Shwoobly closed 1 year ago
The problem here is that the RStan available on CRAN is not up to date with our new array syntax (and I doubt it ever will be given CRAN's policies that require multiple small packages without giving you a way to manage dependencies).
I would recommend checking out the cmdstanr interface, which keeps up to date with Stan: https://mc-stan.org/cmdstanr/
If you'd like to continue using RStan, I'd suggest updating to the latest version from GitHub: https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started
But even the latest RStan is about 1.5 years behind Stan development (we've marked when functions were introduced in the functions reference manual).
Summary:
After running model <- stan_demo() and selecting example 1, a syntax error appeared. I am using a Macbook M2. The 8 schools example worked just fine.
Description:
After running model <- stan_demo() and selecting example 1, a syntax error appeared.
Reproducible Steps:
If you have a reproducible example, please include it.
Current Output:
If applicable, any relevant output from RStan.
SYNTAX ERROR, MESSAGE(S) FROM PARSER: error in 'model160026cc71ed0_imperial_model' at line 5, column 2
PARSER EXPECTED: <one of the following: a variable declaration, beginning with type, (int, real, vector, row_vector, matrix, unit_vector, simplex, ordered, positive_ordered, corr_matrix, cov_matrix, cholesky_corr, cholesky_cov or '}' to close variable declarations> Error in stanc(file = file, model_code = model_code, model_name = model_name, : failed to parse Stan model 'imperial_model' due to the above error.
Expected Output:
If applicable, the output you expected from RStan.
No expectation, I was trying out the demo to see what would be the output.
RStan Version:
The version of RStan you are running (e.g., from
packageVersion("rstan")
) 2.21.8R Version:
The version of R you are running (e.g., from
R.version.string
) R version 4.2.2 (2022-10-31)Operating System:
Your operating system (e.g., OS X 10.11.3) macOS Ventura 13.1