-
-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax error, unable to parse arrays? #1068
Comments
RStan isn't up to date with Stan because of restrictive CRAN policies (hard cap on package sizes, no way to coordinate dependencies among packages). It should work if you install version 2.26 from GitHub following the RStan Getting Started guide: https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started Check out this doc from the Stan Reference Manual for more information: https://mc-stan.org/docs/reference-manual/brackets-array-syntax.html |
Awesome, thanks very much! |
Hi, sorry to keep bugging you, but I just tried installing from the repository, and it is returning this error, then defaulting to installing 2.21 from cran:
It looks like this was noticed the other day with cmdstanr, as well |
Maybe a web server was down? I tried it just now and the index seems to be there. @bgoodri may know or you could ask on the Stan Forums.
|
Huh. I just tried again and it's still doing the same thing for me. Could this be because I am running R 4.3? I have put this up on the stan forum (on a thread describing the initial problem I was having), but nothing yet.
|
You may also want to try It indeed looks like an issue with R 4.3 as you suspected. I updated to 4.3 and now get this:
Here's the session info:
|
Thanks for your help, I just did (got the same advice from the stan forum a minute ago), and that seems to have worked. |
There is an open issue for creating R 4.3 binaries stan-dev/r-packages#10 I'm not sure who is usually managing that repository. Seems like it is often @jgabry or @rok-cesnovar |
Closing now that the new array syntax is finally available in RStan on CRAN! |
Summary:
I'm brand new to using stan, so this may be something I'm doing wrong, but I keep getting an error when trying to run the individual Cormack-Jolly-Seber model in the stan user manual. I am able to run stan programs without arrays seemingly without a problem, but am unable to get arrays to parse.
Description:
The error code I get looks like this:
I found some reports of a similar error from a little over a year ago, with someone responding that rstan had not quite kept up with the stan syntax, but haven't seen anything more recent, so I assume it must have been fixed.
Reproducible Steps:
I have just updated R, so I am running R v. 4.3.0, and v. 2.21.8 of rstan on macOS Monterey 12.6. The data inputs weren't very well described in the manual, but from what I have worked out, a reproducible example would be something like this (with the code for the stan file copied directly from the link above):
I also tried using matrix[,] instead of array[,], but that just gave me a different error.
Would really appreciate some insight as to what is going on here, and whether it's an rstan issue or a me issue.
thanks
The text was updated successfully, but these errors were encountered: