codigator: Find Spanish territorial division codes

Description Usage Arguments Value Examples

View source: R/codigator.R

Description

Provides the INE's official code of the Spanish territorial divisions in x. It uses approximate string matching.

Usage

1
codigator(x, division = "provincia")

Arguments

x

A character or numeric vector (see Value).

division

The type of territorial division to look for: "municipio", "provincia" or "ccaa".

Value

A tibble with x and the corresponding matches and codes. If x is numeric the output will be the name of the matched territorial divisions.

Examples

1
2
x <- c("Pontevedra", "Madrid", "Teruel", "Valencia")
codigator(x)

GuillermoNasarre/ihr documentation built on April 9, 2021, 9:44 a.m.