-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi, I'm trying to run a minimal CGE model (with files posted on https://www.copsmodels.com/minimal.htm) using this procedure but I'm having some troubles with the .tab code translated into R code. After the 'translation' the function equationCoefficientGenerator within model Reference Class have some trouble executing correctly. For example sometimes the code treats strings incorrectly e.g. "households" are called without quotations causing the code to break. Some of those can be worked around but with some I'm having no luck. For example minimal.tab contains function ABS[...] which translated into R remains surrounded by square brackets (rather than round bracket, consistent with R syntax).
Is there a way to easily access and edit equationCoefficientGenerator with some manual fixes? I tried equationCoefficientGenerator <- edit(equationCoefficientGenerator) but it produces an error:
Error in the command 'envRefSetField(...)':
'.->equationCoefficientGenerator' is not a field in class "GEModel"
I'm not very proficient in R so there might be a very simple solution but I wasn't able to find it after many attempts.
I would very much appreciate the assistance, if not with the source of the issue, then just with a way to manualy fix equationCoefficientGenerator - i think with trial and error I can iron out those problems with translation of the code.
Thanks,
Adam
Screenshots from translated code: