I am running R 4.3.1 on an Ubuntu/Linux system with rstan 2.26.22 installed from the Stan repositories but StanHeaders 2.26.27 from CRAN.
Today I was offered to upgrade the StanHeader package to 2.26.28 and I agreed. After the upgrade, library(rstan)
did not work anymore. Rather, I received the error message:
> library(rstan)
Loading required package: StanHeaders
Error: package or namespace load failed for ‘rstan’:
.onLoad failed in loadNamespace() for 'rstan', details:
call: NULL
error: SyntaxError: Illegal break statement
I thought it might be fixed by re-installing rstan
from the Stan repository but that installation also failed with final message:
Error: package or namespace load failed for ‘rstan’:
.onLoad failed in loadNamespace() for 'rstan', details:
call: NULL
error: SyntaxError: Illegal break statement
Error: loading failed
Execution halted
In the end I downgraded StanHeaders
back to 2.26.27 and had a working system again.
I thought I post this hear to warn others that an upgrade of StanHeaders
might invite trouble. Presumably the 2.26.28 version works with the rstan
version on CRAN, otherwise CRAN would (should?) have not accepted the new version of StanHeaders
, but perhaps they have just not realised the problem yet. :-)
I wonder whether this is a clever ploy to finally get rstan
2.26.x onto CRAN. Any news on when that is supposed to happen?
Cheers,
Berwin