str_mxstate: Format state codes with leading zeroes

View source: R/string.R

str_mxstateR Documentation

Format state codes with leading zeroes

Description

Format state codes with leading zeroes

Usage

str_mxstate(code)

Arguments

code

The state code according to the INEGI's Catalogo de entidades federativas, municipios y localidades

Value

The state code in the format required by the plotting functions

See Also

http://www.inegi.org.mx/est/contenidos/proyectos/aspectosmetodologicos/clasificadoresycatalogos/catalogo_entidades.aspx

Examples

str_mxstate(c("12", "2"))
str_mxstate(c(32, 5))

## Not run: 
# warning about invalid state code
str_mxstate("35")

## End(Not run)

diegovalle/mxmaps documentation built on Sept. 22, 2023, 9:57 p.m.