-
Notifications
You must be signed in to change notification settings - Fork 11
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
Ensure all equations contain valid R code #38
Comments
@gonzalezeb, here I point to some equations that currently contain invalid code and I suggest the solutions. Let me know if you have questions or need help. |
This is great Mauro. Two fixes can be applied now and I will work on the other two: fix_problem("attempt", "([0-9])(\(log10)", "\1 * \2") A questions for you: I would like the changes to be applied to our master table (data-raw/allodb-master) but as the code is written now changes would be applied to data/equations. How do I work around it? |
You are right, the equations come from the equation table, and the changes are not applied back to any table. eqn <- equations$equation_allometry`. You could do something like this: # Inputs a vector and outputs a dataframe
fixed_dataframe <- fix_problem(master$equations, ...)
master$equations <- fixed_dataframe$equations This kind of "find and replace" you could also do in excel. But go for it if you want to do it in R. I think it's the best way to learn. |
I reviewed and fixed the equations (the easiest way!). thanks Mauro. For dba or what I call, the srub problem please see issue #41 |
(Details.) Great work @gonzalezeb; thanks! Now all except one error relates to 'dba', which I'll follow up in #41. The exception relates to 'BA'. I had missed this error before. What should we do about it? |
Relates to #54 . |
I plan to write a test to automatically check that each equation can be evaluated -- i.e. that it contains valid R code. Once that is done, we'll be able to press
Control + Shift + T
to run this (and all other) test, and we'll get an informative error message if some equation isn't valid R code.The text was updated successfully, but these errors were encountered: