Closed DesiQuintans closed 1 year ago
Actually, what I should do is leave the package alone and instead leverage tsv2label
's "ignore columns that I don't know about" approach; the user is free to make any other column they want. In this instance, I could have saved the original country codes in a different column while still renaming labels
to merge the country codes into major regions.
I was editing a factor file one day (Standard Australian Classification of Countries 2016) to turn country codes into major region codes, and I disliked how this involved me replacing the country labels entirely with major region labels. It seems to me that a more maintainable and transparent solution is to preserve the original labels alongside their replacements. Maybe add a new column (
recode
?) that, rowwise, is preferentially used over thelabels
column?