Open arni-magnusson opened 3 years ago
Hi Arni,
Thanks for your feedback. I can tell you that in the database Low_F and Low_SSB are numeric :)
About the possibility to negative values, unfortunately that can happen in simulations. We don't have many, but there are a few cases in SAG where that happens.
One possible solution is implemented in pull request https://github.com/ices-tools-prod/icesSAG/pull/214
Hi, I'm running this
and the resulting data frame has columns of type
character
that should (probably) benumeric
:Having these columns as
character
makes the resulting object larger than necessary (1.7 MB instead of 1.4 MB) and prevents numerical calculations.It turns out that the utility function
simplify()
that is used by the parser does not handle negative values correctly, while a similar utility function in icesDatras works fine:From a biological viewpoint, low_SSB and low_F should probably not be negative in the first place, but it seems tempting to make the output from
getSAG()
robust to negative values. One approach could be to revert back to the d408441 version ofsimplify
(same as used in icesDatras), but in case there might be other solutions to consider, I decided to raise this as an issue rather than a pull request.A smaller reproducible example is: