Closed earnaud closed 2 years ago
Here is a picture of the two units causing the issue. The description row seems to be invalid with the second unit. Also, this second unit has no description.
Hi again !
I corrected some of the values returned by EML::get_unitList()
. It concerns mainly the multiplicated units (e.g. millimeter) but also the wordly uncommon values (e.g. feet, inches). I added a unitType
to those units, matching their base type despite of their mutiplier.
I think this can greatly help to find the correct desired unit.
Hi @earnaud, thanks for reporting. The two molePerKilogram
units does seem like a mistake. This package is largely the result of code-gen from the EML standard so the issue(s) you're seeing originate from there. Any fix could then be propagated to this package with a new release.
It sounds like from https://github.com/ropensci/EML/issues/330#issuecomment-958758116 that you found other issues. Is it easy to summarize them here? If not, I can go through your CSV and cross-reference things.
I am using the unit list returned by
get_unitList()
in a shiny app to build a list of choice among which the user shall chose a unit. I remove duplicates with the criterion ofdeprecatedInFavorOf
column. But themolePerKilogram
unit is duplicated without to be annotated as being deprecated anywhere. The only difference between the two units is the unitType (amountOfSubstanceWeight
for one, none for the other)