Hi, this seems to be a very strange problem.
I have this transformed data block
transformed data {
int k = 4; //number of parameters
int m = 5; //number of parameters for NN50
}
On my Mac at home this and the program in which it is embedded compiles and works without problem.
When I try to run the same program on the Mac at work I get
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
ERROR at line 18
17: transformed data {
18: int k = 4; //number of parameters
^
19: int m = 5; //number of parameters for NN50
PARSER EXPECTED: “;”
I’m really puzzled by this. I’ve tried declaring
int k;
int m;
k = 4;
m = 5;
That is legal syntax. My guess is that on the computer where it does not parse, there is a different language or encoding setting. In RStudio there is a setting for this under Global Options -> Code -> Saving.
Hi, thanks for this suggestion. I’ve checked the settings between the home Mac and the work Mac, but there are no differences. I tried various settings, also checked that I had all libraries up to date, but nothing seems to solve this very strange problem.
Mel
hi, I solved the problem by reinstalling everything, R, RStudio and Rstan on the work computer, now it all works fine.
(Still is a strange error, and cause unknown).
Thanks
Mel