DOI-USGS / DOI-USGS/streamMetabolizer
Syntax error when trying to model metab in bayes
- Dominant language
- Stan
- Stars
- 47
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to run the test/tutorial data that comes with the streamMetabolizer package for a bayes model. I get the following error when trying to fit the model to data:
> Warning message:
In metab_fun(specs = specs, data = data, data_daily = data_daily, :
Modeling failed
Errors:
0
Syntax error in 'string', line 27, column 19 to column 20, parsing error:
-------------------------------------------------
25:
26: // Data
27: vector[d] DO_obs[n];
^
28: vector[d] DO_sat[n];
29: vector[d] light_mult_GPP[n];
-------------------------------------------------
> Ill-formed declaration. ";" expected after variable declaration.
> It looks like you are trying to use the old array syntax.
> Please use the new syntax:
> array[n] vector[d] DO_obs;
I don't know what to do to fix this. I can't tell which file its pulling this information from and when I look at the data there is only 3 columns, not 19, so I'm very confused.
Additional info:
- I'm using the most recent version of R studio
- the code line I'm running that's returning this warning is "mm <- metab(bayes_specs, data=dat)"
- I've tried uninstalling/reinstalling the packages and the packages "rstan" and "StanHeaders" (might be unrelated but it did fix a different error I was receiving)
I'd appreciate any insight/help. First time posting on GitHub so I apologize if there are formatting mistakes or of I'm missing any information that is needed.
Contributor guide
Assessment
This issue has not been assessed yet.