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.
[x] Have you successfully run devtools::check() locally?
[x] Have you updated or added function (and vignette if applicable) documentation? Did you update the 'man' and 'NAMESPACE' files with devtools::document()?
[x] Have you added in tests for the changes included in the PR?
[x] Do the changes follow the ihmeuw-demographicscode style?
[ ] Do your changes need to be immediately included in a new build of docker-base or docker-internal? If so follow directions in those repositories to rebuild and redeploy the images.
Describe changes
This fixes an issue when scaling or aggregating when
col_stem
was equal to a numeric variable like 'location_id'. Thedata.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
ihmeuw-demographics
R packages?devtools::check()
locally?devtools::document()
?ihmeuw-demographics
code style?docker-base
ordocker-internal
? If so follow directions in those repositories to rebuild and redeploy the images.