ihmeuw-demographics / hierarchyUtils

Demographics Related Utility Functions
https://ihmeuw-demographics.github.io/hierarchyUtils/
BSD 3-Clause "New" or "Revised" License
8 stars 3 forks source link

BUGFIX: preserve the 'col_stem' variable type #45

Closed chacalle closed 4 years ago

chacalle commented 4 years ago

Describe changes

This fixes an issue when scaling or aggregating when col_stem was equal to a numeric variable like 'location_id'. The data.tree functions would convert the variable to a character automatically but we want to preserve the original type for the aggregated dataset.

This was causing the functions to break later in scale when merging the new values to the old dataset.

Installed locally to the v2020.0.7 image for now

Checklist

Packages Repositories

krpaulson commented 4 years ago

Worth adding a test for this?