str_mxmunicipio | R Documentation |
Format municipio codes with leading zeroes
str_mxmunicipio(code, municipio_code)
code |
The sate or combined state and municipio code if the municipio_code variable is missing |
municipio_code |
The municipio code |
The state and municipio code in the format required by the plotting functions
# Format the concatenated string of state code + municipio code
str_mxmunicipio(c("1006", "2003"))
# Format the state and municipio code separately
str_mxmunicipio(c(10, 6), c(20, 3))
## Not run:
# warning about invalid code
str_mxmunicipio(33, 999)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.