In master (2.0.3) the standardUnits object created in standardUnits.R and saved to sysdata.rda appears to be inaccurate. In this version, the standard unit "percent" is incorrectly interpreted as a custom unit.
> r <- EML::set_attributes(
data.frame(
attributeName = "soilmoisture",
formatString = "",
unit = "percent",
numberType = "real",
attributeDefinition = "measurement of soil moisture",
stringsAsFactors = FALSE),
col_classes = "numeric")
Warning message:
In set_attribute(attributes[i, ], factors = factors, missingValues = missingValues) :
Unit 'percent' is not a recognized standard unit; treating as custom unit. Please be sure you also define a custom unit in your EML record, or replace with a recognized standard unit. See set_unitList() for details.
>
I've refreshed the standardUnits object and the standard unit "percent" is now correctly interpreted.
> r <- EML::set_attributes(
data.frame(
attributeName = "soilmoisture",
formatString = "",
unit = "percent",
numberType = "real",
attributeDefinition = "measurement of soil moisture",
stringsAsFactors = FALSE),
col_classes = "numeric")
>
However, this change broke a number of tests in the get_unit_id test suite. This seems to have originated from a missing udunits_units object. I formally created and saved this object in standardUnits.R along side the standardUnits object. Furthermore, I updated the deprecated devtools::use_data() with usethis::use_data() and set the argument overwrite = TRUE.
Good day @cboettig @amoeba !
In master (2.0.3) the standardUnits object created in standardUnits.R and saved to sysdata.rda appears to be inaccurate. In this version, the standard unit "percent" is incorrectly interpreted as a custom unit.
I've refreshed the standardUnits object and the standard unit "percent" is now correctly interpreted.
However, this change broke a number of tests in the
get_unit_id
test suite. This seems to have originated from a missingudunits_units
object. I formally created and saved this object in standardUnits.R along side thestandardUnits
object. Furthermore, I updated the deprecated devtools::use_data() with usethis::use_data() and set the argument overwrite = TRUE.A PR is on the way.
My session info: