R/string.R
str_mxstate.Rd
Format state codes with leading zeroes
str_mxstate(code)
The state code according to the INEGI's Catalogo de entidades federativas, municipios y localidades
The state code in the format required by the plotting functions
http://www.inegi.org.mx/est/contenidos/proyectos/aspectosmetodologicos/clasificadoresycatalogos/catalogo_entidades.aspx
str_mxstate(c("12", "2")) #> [1] "12" "02" str_mxstate(c(32, 5)) #> [1] "32" "05" if (FALSE) { # warning about invalid state code str_mxstate("35") }