USEPA/EPATADA

The foramt of the reference table from EPATADA's TADA_GetSynonymRef function

ycwwang opened this issue · 1 comments

What is your question?

It seems like the EPATADA's TADA_GetSynonymRef returns a table that does not contain columns with unit information.

To Reproduce

The TADA's TADA_GetSynonymRef returns a data frame with 329 rows and 16 columns, but EPATADA's TADA_GetSynonymRef returns a data frame with only 11 columns. Five columns disappeared, and they are columns with unit information.

TADA_ref <- TADA::TADA_GetSynonymRef()

EPATADA_ref <- EPATADA::TADA_GetSynonymRef()

dim(TADA_ref)
# [1] 329  16

dim(EPATADA_ref)
# [1] 329  11

names(TADA_ref)[!names(TADA_ref) %in% names(EPATADA_ref)]
# [1] "TADA.ResultMeasure.MeasureUnitCode"        "Target.TADA.ResultMeasure.MeasureUnitCode"
# [3] "Target.TADA.UnitConversionFactor"          "Target.TADA.UnitConversionCoefficient"    
# [5] "TADA.UnitConversionRef"

Expected behavior

If the EPATADA package only aims to harmonzie the data based on the CharacteristicName and ResultSampleFractionText, the reference table could be in the correct format and the TADA_GetSynonymRef function works properly. However, the documentation still mentions that "TADA.ResultMeasure.MeasureUnitCode" should be in the table. Please check if the TADA_GetSynonymRef function works as expected.

Thanks for reporting this issue. TADA_GetSynonymRef is working as expected as we've made some updates in recent months to handle unit conversions in a separate function that allows users to make parameter-specific conversion decisions (see https://usepa.github.io/EPATADA/reference/TADA_ConvertResultUnits.html).

However, as you noticed, the documentation still needs some updates to accurately reflect this change. I should be able to make those updates this week and will add a comment here when I do.