The current implementation of xmap_reverse() is a bit clunky. it would be better if
[ ] it retained unit weights in recode maps (only swapping the col_to and col_from) attributes
[ ] rather than a weights_in argument, it overrides the weights by default (since it will always be adding unit weights).
Once this is implemented:
[ ] update the 'making-xmaps' vignette
Imagine that instead of converting country codes from ISO Numeric to ISO-2 digit, we wanted to convert from ISO-2 digit to ISO Numeric. We can take the existing crossmap and invert it using unit weights:
```{r}
iso_xmap |>
xmap_reverse()
We can overwrite the existing weights by using the weights_into argument
The current implementation of
xmap_reverse()
is a bit clunky. it would be better ifcol_to
andcol_from
) attributesweights_in
argument, it overrides the weights by default (since it will always be adding unit weights).Once this is implemented:
'making-xmaps'
vignetteWe can overwrite the existing weights by using the
weights_into
argument