
Prove a recode with a before/after cross-tabulation
Source:R/categorical_guard.R
morie_crosstab_verify.RdThe check that catches category-mapping corruption on the day it happens instead of years later: cross-tabulates the original against the recoded values and ERRORS unless the realized mapping is a function (each old category to exactly one new category) that matches the declared mapping, with no rows lost.